mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
chans loading screen animated asset update
This commit is contained in:
parent
bf4c44ad1b
commit
3c345f2668
4 changed files with 22 additions and 5 deletions
BIN
assets/gif/stacy-plain.gif
Normal file
BIN
assets/gif/stacy-plain.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 MiB |
|
@ -16,6 +16,12 @@ class LoadingView extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
final width = min(size.width, size.height) * 0.5;
|
||||
|
||||
final isChan = Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.chan ||
|
||||
Theme.of(context).extension<StackColors>()!.themeType ==
|
||||
ThemeType.darkChans;
|
||||
|
||||
return Background(
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
|
||||
|
@ -35,11 +41,17 @@ class LoadingView extends StatelessWidget {
|
|||
),
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
child: Lottie.asset(
|
||||
Assets.lottie.test2,
|
||||
animate: true,
|
||||
repeat: true,
|
||||
),
|
||||
child: isChan
|
||||
? Image(
|
||||
image: AssetImage(
|
||||
Assets.gif.stacyPlain,
|
||||
),
|
||||
)
|
||||
: Lottie.asset(
|
||||
Assets.lottie.test2,
|
||||
animate: true,
|
||||
repeat: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
// child: Image(
|
||||
|
|
|
@ -401,6 +401,8 @@ class _ANIMATIONS {
|
|||
class _GIF {
|
||||
const _GIF();
|
||||
|
||||
String get stacyPlain => "assets/gif/stacy-plain.gif";
|
||||
|
||||
String plain(Coin coin) {
|
||||
return "assets/gif/coins/${coin.mainNetVersion.name}/plain.gif";
|
||||
}
|
||||
|
|
|
@ -364,6 +364,9 @@ flutter:
|
|||
# basic
|
||||
- assets/lottie/test2.json
|
||||
|
||||
# gifs
|
||||
- assets/gif/
|
||||
|
||||
# coin gifs
|
||||
- assets/gif/coins/bitcoin/
|
||||
- assets/gif/coins/bitcoincash/
|
||||
|
|
Loading…
Reference in a new issue