chans loading screen animated asset update

This commit is contained in:
julian 2023-03-21 09:29:58 -06:00
parent bf4c44ad1b
commit 3c345f2668
4 changed files with 22 additions and 5 deletions

BIN
assets/gif/stacy-plain.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

View file

@ -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(

View file

@ -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";
}

View file

@ -364,6 +364,9 @@ flutter:
# basic
- assets/lottie/test2.json
# gifs
- assets/gif/
# coin gifs
- assets/gif/coins/bitcoin/
- assets/gif/coins/bitcoincash/