fruit sorbet coin images
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
@ -1,8 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
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/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.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({
|
const CoinImage({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.coin,
|
required this.coin,
|
||||||
|
@ -13,8 +17,16 @@ class CoinImage extends StatelessWidget {
|
||||||
final bool isDesktop;
|
final bool isDesktop;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Image(
|
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(
|
image: AssetImage(
|
||||||
Assets.png.imageFor(coin: coin, context: context),
|
Assets.png.imageFor(coin: coin, context: context),
|
||||||
),
|
),
|
||||||
|
|
|
@ -207,6 +207,7 @@ class _SVG {
|
||||||
String get ellipse1 => "assets/svg/Ellipse-43.svg";
|
String get ellipse1 => "assets/svg/Ellipse-43.svg";
|
||||||
String get ellipse2 => "assets/svg/Ellipse-42.svg";
|
String get ellipse2 => "assets/svg/Ellipse-42.svg";
|
||||||
|
|
||||||
|
// small icons
|
||||||
String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg";
|
String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg";
|
||||||
String get litecoin => "assets/svg/coin_icons/Litecoin.svg";
|
String get litecoin => "assets/svg/coin_icons/Litecoin.svg";
|
||||||
String get bitcoincash => "assets/svg/coin_icons/Bitcoincash.svg";
|
String get bitcoincash => "assets/svg/coin_icons/Bitcoincash.svg";
|
||||||
|
@ -265,6 +266,52 @@ class _SVG {
|
||||||
return dogecoinTestnet;
|
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 {
|
class _PNG {
|
||||||
|
|
24
pubspec.yaml
|
@ -355,15 +355,27 @@ flutter:
|
||||||
# fruit sorbet theme coin
|
# fruit sorbet theme coin
|
||||||
- assets/images/fruitSorbet/stack.png
|
- assets/images/fruitSorbet/stack.png
|
||||||
- assets/images/fruitSorbet/monero.png
|
- assets/images/fruitSorbet/monero.png
|
||||||
- assets/images/fruitSorbet/wownero.png
|
# - assets/images/fruitSorbet/wownero.png
|
||||||
- assets/images/fruitSorbet/firo.png
|
# - assets/images/fruitSorbet/firo.png
|
||||||
- assets/images/fruitSorbet/litecoin.png
|
- assets/images/fruitSorbet/litecoin.png
|
||||||
- assets/images/fruitSorbet/doge.png
|
# - assets/images/fruitSorbet/doge.png
|
||||||
- assets/images/fruitSorbet/bitcoin.png
|
# - assets/images/fruitSorbet/bitcoin.png
|
||||||
- assets/images/fruitSorbet/epic-cash.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/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
|
# forest theme coin
|
||||||
- assets/images/forest/stack.png
|
- assets/images/forest/stack.png
|
||||||
|
|