Fuck flutter assets

This commit is contained in:
Mercurio 2025-01-23 22:55:32 +01:00
parent caac8bf978
commit ce1a54c58b
9 changed files with 10 additions and 17 deletions

View file

@ -75,14 +75,14 @@ class _ProfilePageState extends State<ProfilePage> {
} }
String getRankImage(int? elo) { String getRankImage(int? elo) {
if (elo == null) return 'ranks/none.png'; if (elo == null) return '$apiurl/assets/none.png';
if (elo > 1000) return 'ranks/u.png'; if (elo > 1000) return '$apiurl/assets/U.png';
if (elo > 750) return 'ranks/s.png'; if (elo > 750) return '$apiurl/assets/S.png';
if (elo > 400) return 'ranks/a.png'; if (elo > 400) return '$apiurl/assets/A.png';
if (elo > 200) return 'ranks/b.png'; if (elo > 200) return '$apiurl/assets/B.png';
if (elo > 100) return 'ranks/c.png'; if (elo > 100) return '$apiurl/assets/C.png';
if (elo > 30) return 'ranks/d.png'; if (elo > 30) return '$apiurl/assets/D.png';
return 'ranks/none.png'; return '$apiurl/assets/none.png';
} }
@override @override
@ -128,7 +128,7 @@ class _ProfilePageState extends State<ProfilePage> {
], ],
), ),
SizedBox(width: 25), SizedBox(width: 25),
Image.asset( Image.network(
getRankImage(_elo), getRankImage(_elo),
width: 137, width: 137,
height: 137, height: 137,

View file

@ -27,14 +27,7 @@ flutter:
uses-material-design: true uses-material-design: true
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
assets: # assets:
- ranks/none.png
- ranks/A.png
- ranks/B.png
- ranks/C.png
- ranks/D.png
- ranks/S.png
- ranks/U.png
# - images/a_dot_ham.jpeg # - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB