Skip to content

Commit

Permalink
Use PNG images instead of SVG for FIDE federation flags in order to
Browse files Browse the repository at this point in the history
solve performance issues
  • Loading branch information
julien4215 committed Dec 16, 2024
1 parent dfadce4 commit be453d3
Show file tree
Hide file tree
Showing 207 changed files with 2 additions and 53 deletions.
Binary file added assets/images/fide-fed/2.0x/AFG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/AHO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ALB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ALG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/AND.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ANG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ANT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ARG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ARM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/ARU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/AUS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/AUT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/AZE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BAH.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BAN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BAR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BDI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BEL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BER.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BHU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BIH.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BIZ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BLR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BOL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BOT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fide-fed/2.0x/BRA.png
Binary file added assets/images/fide-fed/2.0x/BRN.png
Binary file added assets/images/fide-fed/2.0x/BRU.png
Binary file added assets/images/fide-fed/2.0x/BUL.png
Binary file added assets/images/fide-fed/2.0x/BUR.png
Binary file added assets/images/fide-fed/2.0x/CAF.png
Binary file added assets/images/fide-fed/2.0x/CAM.png
Binary file added assets/images/fide-fed/2.0x/CAN.png
Binary file added assets/images/fide-fed/2.0x/CAY.png
Binary file added assets/images/fide-fed/2.0x/CHA.png
Binary file added assets/images/fide-fed/2.0x/CHI.png
Binary file added assets/images/fide-fed/2.0x/CHN.png
Binary file added assets/images/fide-fed/2.0x/CIV.png
Binary file added assets/images/fide-fed/2.0x/CMR.png
Binary file added assets/images/fide-fed/2.0x/COD.png
Binary file added assets/images/fide-fed/2.0x/COL.png
Binary file added assets/images/fide-fed/2.0x/COM.png
Binary file added assets/images/fide-fed/2.0x/CPV.png
Binary file added assets/images/fide-fed/2.0x/CRC.png
Binary file added assets/images/fide-fed/2.0x/CRO.png
Binary file added assets/images/fide-fed/2.0x/CUB.png
Binary file added assets/images/fide-fed/2.0x/CYP.png
Binary file added assets/images/fide-fed/2.0x/CZE.png
Binary file added assets/images/fide-fed/2.0x/DEN.png
Binary file added assets/images/fide-fed/2.0x/DJI.png
Binary file added assets/images/fide-fed/2.0x/DMA.png
Binary file added assets/images/fide-fed/2.0x/DOM.png
Binary file added assets/images/fide-fed/2.0x/ECU.png
Binary file added assets/images/fide-fed/2.0x/EGY.png
Binary file added assets/images/fide-fed/2.0x/ENG.png
Binary file added assets/images/fide-fed/2.0x/ERI.png
Binary file added assets/images/fide-fed/2.0x/ESA.png
Binary file added assets/images/fide-fed/2.0x/ESP.png
Binary file added assets/images/fide-fed/2.0x/EST.png
Binary file added assets/images/fide-fed/2.0x/ETH.png
Binary file added assets/images/fide-fed/2.0x/FAI.png
Binary file added assets/images/fide-fed/2.0x/FID.png
Binary file added assets/images/fide-fed/2.0x/FIJ.png
Binary file added assets/images/fide-fed/2.0x/FIN.png
Binary file added assets/images/fide-fed/2.0x/FRA.png
Binary file added assets/images/fide-fed/2.0x/GAB.png
Binary file added assets/images/fide-fed/2.0x/GAM.png
Binary file added assets/images/fide-fed/2.0x/GCI.png
Binary file added assets/images/fide-fed/2.0x/GEO.png
Binary file added assets/images/fide-fed/2.0x/GEQ.png
Binary file added assets/images/fide-fed/2.0x/GER.png
Binary file added assets/images/fide-fed/2.0x/GHA.png
Binary file added assets/images/fide-fed/2.0x/GRE.png
Binary file added assets/images/fide-fed/2.0x/GRN.png
Binary file added assets/images/fide-fed/2.0x/GUA.png
Binary file added assets/images/fide-fed/2.0x/GUM.png
Binary file added assets/images/fide-fed/2.0x/GUY.png
Binary file added assets/images/fide-fed/2.0x/HAI.png
Binary file added assets/images/fide-fed/2.0x/HKG.png
Binary file added assets/images/fide-fed/2.0x/HON.png
Binary file added assets/images/fide-fed/2.0x/HUN.png
Binary file added assets/images/fide-fed/2.0x/INA.png
Binary file added assets/images/fide-fed/2.0x/IND.png
Binary file added assets/images/fide-fed/2.0x/IOM.png
Binary file added assets/images/fide-fed/2.0x/IRI.png
Binary file added assets/images/fide-fed/2.0x/IRL.png
Binary file added assets/images/fide-fed/2.0x/IRQ.png
Binary file added assets/images/fide-fed/2.0x/ISL.png
Binary file added assets/images/fide-fed/2.0x/ISR.png
Binary file added assets/images/fide-fed/2.0x/ISV.png
Binary file added assets/images/fide-fed/2.0x/ITA.png
Binary file added assets/images/fide-fed/2.0x/IVB.png
Binary file added assets/images/fide-fed/2.0x/JAM.png
Binary file added assets/images/fide-fed/2.0x/JCI.png
Binary file added assets/images/fide-fed/2.0x/JOR.png
Binary file added assets/images/fide-fed/2.0x/JPN.png
Binary file added assets/images/fide-fed/2.0x/KAZ.png
Binary file added assets/images/fide-fed/2.0x/KEN.png
Binary file added assets/images/fide-fed/2.0x/KGZ.png
Binary file added assets/images/fide-fed/2.0x/KOR.png
Binary file added assets/images/fide-fed/2.0x/KOS.png
Binary file added assets/images/fide-fed/2.0x/KSA.png
Binary file added assets/images/fide-fed/2.0x/KUW.png
Binary file added assets/images/fide-fed/2.0x/LAO.png
Binary file added assets/images/fide-fed/2.0x/LAT.png
Binary file added assets/images/fide-fed/2.0x/LBA.png
Binary file added assets/images/fide-fed/2.0x/LBN.png
Binary file added assets/images/fide-fed/2.0x/LBR.png
Binary file added assets/images/fide-fed/2.0x/LCA.png
Binary file added assets/images/fide-fed/2.0x/LES.png
Binary file added assets/images/fide-fed/2.0x/LIE.png
Binary file added assets/images/fide-fed/2.0x/LTU.png
Binary file added assets/images/fide-fed/2.0x/LUX.png
Binary file added assets/images/fide-fed/2.0x/MAC.png
Binary file added assets/images/fide-fed/2.0x/MAD.png
Binary file added assets/images/fide-fed/2.0x/MAR.png
Binary file added assets/images/fide-fed/2.0x/MAS.png
Binary file added assets/images/fide-fed/2.0x/MAW.png
Binary file added assets/images/fide-fed/2.0x/MDA.png
Binary file added assets/images/fide-fed/2.0x/MDV.png
Binary file added assets/images/fide-fed/2.0x/MEX.png
Binary file added assets/images/fide-fed/2.0x/MGL.png
Binary file added assets/images/fide-fed/2.0x/MKD.png
Binary file added assets/images/fide-fed/2.0x/MLI.png
Binary file added assets/images/fide-fed/2.0x/MLT.png
Binary file added assets/images/fide-fed/2.0x/MNC.png
Binary file added assets/images/fide-fed/2.0x/MNE.png
Binary file added assets/images/fide-fed/2.0x/MOZ.png
Binary file added assets/images/fide-fed/2.0x/MRI.png
Binary file added assets/images/fide-fed/2.0x/MTN.png
Binary file added assets/images/fide-fed/2.0x/MYA.png
Binary file added assets/images/fide-fed/2.0x/NAM.png
Binary file added assets/images/fide-fed/2.0x/NCA.png
Binary file added assets/images/fide-fed/2.0x/NED.png
Binary file added assets/images/fide-fed/2.0x/NEP.png
Binary file added assets/images/fide-fed/2.0x/NGR.png
Binary file added assets/images/fide-fed/2.0x/NIG.png
Binary file added assets/images/fide-fed/2.0x/NOR.png
Binary file added assets/images/fide-fed/2.0x/NRU.png
Binary file added assets/images/fide-fed/2.0x/NZL.png
Binary file added assets/images/fide-fed/2.0x/OMA.png
Binary file added assets/images/fide-fed/2.0x/PAK.png
Binary file added assets/images/fide-fed/2.0x/PAN.png
Binary file added assets/images/fide-fed/2.0x/PAR.png
Binary file added assets/images/fide-fed/2.0x/PER.png
Binary file added assets/images/fide-fed/2.0x/PHI.png
Binary file added assets/images/fide-fed/2.0x/PLE.png
Binary file added assets/images/fide-fed/2.0x/PLW.png
Binary file added assets/images/fide-fed/2.0x/PNG.png
Binary file added assets/images/fide-fed/2.0x/POL.png
Binary file added assets/images/fide-fed/2.0x/POR.png
Binary file added assets/images/fide-fed/2.0x/PUR.png
Binary file added assets/images/fide-fed/2.0x/QAT.png
Binary file added assets/images/fide-fed/2.0x/ROU.png
Binary file added assets/images/fide-fed/2.0x/RSA.png
Binary file added assets/images/fide-fed/2.0x/RUS.png
Binary file added assets/images/fide-fed/2.0x/RWA.png
Binary file added assets/images/fide-fed/2.0x/SCO.png
Binary file added assets/images/fide-fed/2.0x/SEN.png
Binary file added assets/images/fide-fed/2.0x/SEY.png
Binary file added assets/images/fide-fed/2.0x/SGP.png
Binary file added assets/images/fide-fed/2.0x/SKN.png
Binary file added assets/images/fide-fed/2.0x/SLE.png
Binary file added assets/images/fide-fed/2.0x/SLO.png
Binary file added assets/images/fide-fed/2.0x/SMR.png
Binary file added assets/images/fide-fed/2.0x/SOL.png
Binary file added assets/images/fide-fed/2.0x/SOM.png
Binary file added assets/images/fide-fed/2.0x/SRB.png
Binary file added assets/images/fide-fed/2.0x/SRI.png
Binary file added assets/images/fide-fed/2.0x/SSD.png
Binary file added assets/images/fide-fed/2.0x/STP.png
Binary file added assets/images/fide-fed/2.0x/SUD.png
Binary file added assets/images/fide-fed/2.0x/SUI.png
Binary file added assets/images/fide-fed/2.0x/SUR.png
Binary file added assets/images/fide-fed/2.0x/SVK.png
Binary file added assets/images/fide-fed/2.0x/SWE.png
Binary file added assets/images/fide-fed/2.0x/SWZ.png
Binary file added assets/images/fide-fed/2.0x/SYR.png
Binary file added assets/images/fide-fed/2.0x/TAN.png
Binary file added assets/images/fide-fed/2.0x/THA.png
Binary file added assets/images/fide-fed/2.0x/TJK.png
Binary file added assets/images/fide-fed/2.0x/TKM.png
Binary file added assets/images/fide-fed/2.0x/TLS.png
Binary file added assets/images/fide-fed/2.0x/TOG.png
Binary file added assets/images/fide-fed/2.0x/TPE.png
Binary file added assets/images/fide-fed/2.0x/TTO.png
Binary file added assets/images/fide-fed/2.0x/TUN.png
Binary file added assets/images/fide-fed/2.0x/TUR.png
Binary file added assets/images/fide-fed/2.0x/UAE.png
Binary file added assets/images/fide-fed/2.0x/UGA.png
Binary file added assets/images/fide-fed/2.0x/UKR.png
Binary file added assets/images/fide-fed/2.0x/URU.png
Binary file added assets/images/fide-fed/2.0x/USA.png
Binary file added assets/images/fide-fed/2.0x/UZB.png
Binary file added assets/images/fide-fed/2.0x/VAN.png
Binary file added assets/images/fide-fed/2.0x/VEN.png
Binary file added assets/images/fide-fed/2.0x/VIE.png
Binary file added assets/images/fide-fed/2.0x/VIN.png
Binary file added assets/images/fide-fed/2.0x/W.png
Binary file added assets/images/fide-fed/2.0x/WLS.png
Binary file added assets/images/fide-fed/2.0x/YEM.png
Binary file added assets/images/fide-fed/2.0x/ZAM.png
Binary file added assets/images/fide-fed/2.0x/ZIM.png
4 changes: 0 additions & 4 deletions lib/src/utils/lichess_assets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ String lichessFlagSrc(String country) {
String lichessFlairSrc(String flair) {
return '$kLichessCDNHost/assets/flair/img/$flair.webp';
}

String lichessFideFedSrc(String name) {
return '$kLichessCDNHost/assets/images/fide-fed/$name.svg';
}
9 changes: 1 addition & 8 deletions lib/src/view/broadcast/broadcast_player_widget.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:lichess_mobile/src/network/http.dart';
import 'package:lichess_mobile/src/styles/styles.dart';
import 'package:lichess_mobile/src/utils/lichess_assets.dart';

class BroadcastPlayerWidget extends ConsumerWidget {
const BroadcastPlayerWidget({
Expand All @@ -25,11 +22,7 @@ class BroadcastPlayerWidget extends ConsumerWidget {
return Row(
children: [
if (federation != null) ...[
SvgPicture.network(
lichessFideFedSrc(federation!),
height: 12,
httpClient: ref.read(defaultClientProvider),
),
Image.asset('assets/images/fide-fed/$federation.png', height: 12),
const SizedBox(width: 5),
],
if (title != null) ...[
Expand Down
40 changes: 0 additions & 40 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.2.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123"
url: "https://pub.dev"
source: hosted
version: "2.0.16"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -1035,14 +1027,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -1601,30 +1585,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.5.1"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7"
url: "https://pub.dev"
source: hosted
version: "1.1.15"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb"
url: "https://pub.dev"
source: hosted
version: "1.1.12"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"
url: "https://pub.dev"
source: hosted
version: "1.1.16"
vector_math:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ dependencies:
url: https://github.com/veloce/flutter_slidable.git
ref: 89b8384667d3b6c1c2967a8ff10846bcf0a170c7
flutter_spinkit: ^5.2.0
flutter_svg: ^2.0.10+1
freezed_annotation: ^2.2.0
http: ^1.1.0
intl: ^0.19.0
Expand Down Expand Up @@ -106,6 +105,7 @@ flutter:
- assets/chess_openings.db
- assets/images/
- assets/images/stockfish/
- assets/images/fide-fed/
- assets/sounds/futuristic/
- assets/sounds/lisp/
- assets/sounds/nes/
Expand Down

0 comments on commit be453d3

Please sign in to comment.