From 9f64393d35cd3cd6a5bfe090565e2acae3a99422 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 17 Mar 2023 16:15:05 -0600 Subject: [PATCH] precache chan theme selector --- lib/utilities/assets.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index 46728f9b4..25c434fa0 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -3,6 +3,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/color_theme.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/utilities/util.dart'; abstract class Assets { static const svg = _SVG(); @@ -15,15 +16,19 @@ abstract class Assets { static Future precache(BuildContext context) async { final assets = [ + svg.iconFor(coin: Coin.dogecoin), svg.stack(context), svg.personaEasy(context), svg.personaIncognito(context), - svg.iconFor(coin: Coin.dogecoin), ...Coin.values.map( (e) => svg.imageFor(context: context, coin: e), ), ]; + if (Util.isDesktop) { + assets.add(svg.themeChan); + } + final futures = assets.map( (e) => precachePicture( ExactAssetPicture(