fruit sorbet coin images

This commit is contained in:
ryleedavis 2023-02-14 14:29:41 -07:00
parent c5e3a0ddb6
commit ce98482705
9 changed files with 85 additions and 14 deletions

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1,8 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/providers/ui/color_theme_provider.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
class CoinImage extends StatelessWidget {
class CoinImage extends ConsumerWidget {
const CoinImage({
Key? key,
required this.coin,
@ -13,12 +17,20 @@ class CoinImage extends StatelessWidget {
final bool isDesktop;
@override
Widget build(BuildContext context) {
return Image(
image: AssetImage(
Assets.png.imageFor(coin: coin, context: context),
),
width: isDesktop ? 324 : MediaQuery.of(context).size.width / 3,
);
Widget build(BuildContext context, WidgetRef ref) {
final bool isSorbet = ref.read(colorThemeProvider.state).state.themeType ==
ThemeType.fruitSorbet;
return isSorbet
? SvgPicture.asset(
Assets.svg.imageFor(coin: coin),
width: isDesktop ? 324 : MediaQuery.of(context).size.width / 3,
)
: Image(
image: AssetImage(
Assets.png.imageFor(coin: coin, context: context),
),
width: isDesktop ? 324 : MediaQuery.of(context).size.width / 3,
);
}
}

View file

@ -207,6 +207,7 @@ class _SVG {
String get ellipse1 => "assets/svg/Ellipse-43.svg";
String get ellipse2 => "assets/svg/Ellipse-42.svg";
// small icons
String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg";
String get litecoin => "assets/svg/coin_icons/Litecoin.svg";
String get bitcoincash => "assets/svg/coin_icons/Bitcoincash.svg";
@ -265,6 +266,52 @@ class _SVG {
return dogecoinTestnet;
}
}
// big icons
String get bitcoinImage => "assets/images/fruitSorbet/bitcoin.svg";
String get bitcoincashImage => "assets/images/fruitSorbet/bitcoincash.svg";
String get dogecoinImage => "assets/images/fruitSorbet/doge.svg";
// String get epicCashImage => "assets/images/fruitSorbet/epic-cash.svg";
String get firoImage => "assets/images/fruitSorbet/firo.svg";
// String get litecoinImage => "assets/svg/coin_icons/litecoin.svg";
// String get moneroImage => "assets/svg/coin_icons/Monero.svg";
String get wowneroImage => "assets/images/fruitSorbet/wownero.svg";
// String get namecoinImage => "assets/svg/coin_icons/Namecoin.svg";
String get particlImage => "assets/images/fruitSorbet/particl.svg";
String imageFor({required Coin coin}) {
switch (coin) {
case Coin.bitcoin:
return bitcoinImage;
case Coin.litecoin:
case Coin.litecoinTestNet:
return litecoin;
case Coin.bitcoincash:
return bitcoincashImage;
case Coin.dogecoin:
return dogecoinImage;
case Coin.epicCash:
return epicCash;
case Coin.firo:
return firoImage;
case Coin.monero:
return monero;
case Coin.wownero:
return wowneroImage;
case Coin.namecoin:
return namecoin;
case Coin.particl:
return particlImage;
case Coin.bitcoinTestNet:
return bitcoinImage;
case Coin.bitcoincashTestnet:
return bitcoincashImage;
case Coin.firoTestNet:
return firoImage;
case Coin.dogecoinTestNet:
return dogecoinImage;
}
}
}
class _PNG {

View file

@ -355,15 +355,27 @@ flutter:
# fruit sorbet theme coin
- assets/images/fruitSorbet/stack.png
- assets/images/fruitSorbet/monero.png
- assets/images/fruitSorbet/wownero.png
- assets/images/fruitSorbet/firo.png
# - assets/images/fruitSorbet/wownero.png
# - assets/images/fruitSorbet/firo.png
- assets/images/fruitSorbet/litecoin.png
- assets/images/fruitSorbet/doge.png
- assets/images/fruitSorbet/bitcoin.png
# - assets/images/fruitSorbet/doge.png
# - assets/images/fruitSorbet/bitcoin.png
- assets/images/fruitSorbet/epic-cash.png
- assets/images/fruitSorbet/bitcoincash.png
# - assets/images/fruitSorbet/bitcoincash.png
- assets/images/fruitSorbet/namecoin.png
- assets/images/fruitSorbet/particl.png
# - assets/images/fruitSorbet/particl.png
- assets/images/fruitSorbet/bitcoin.svg
# - assets/images/fruitSorbet/monero.svg
- assets/images/fruitSorbet/wownero.svg
- assets/images/fruitSorbet/firo.svg
# - assets/images/fruitSorbet/litecoin.svg
- assets/images/fruitSorbet/doge.svg
# - assets/images/fruitSorbet/epic-cash.svg
- assets/images/fruitSorbet/bitcoincash.svg
# - assets/images/fruitSorbet/namecoin.svg
- assets/images/fruitSorbet/particl.svg
# forest theme coin
- assets/images/forest/stack.png