mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
precache chan theme selector
This commit is contained in:
parent
864375e7ae
commit
9f64393d35
1 changed files with 6 additions and 1 deletions
|
@ -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<void> 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(
|
||||
|
|
Loading…
Reference in a new issue