chans loading indicator

This commit is contained in:
julian 2023-04-12 08:41:35 -06:00
parent 20f6754de5
commit fbe4767e5c

View file

@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart'; import 'package:lottie/lottie.dart';
import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
class LoadingIndicator extends StatelessWidget { class LoadingIndicator extends StatelessWidget {
const LoadingIndicator({ const LoadingIndicator({
@ -14,17 +16,28 @@ class LoadingIndicator extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final isChan = Theme.of(context).extension<StackColors>()!.themeType ==
ThemeType.chan ||
Theme.of(context).extension<StackColors>()!.themeType ==
ThemeType.darkChans;
return Container( return Container(
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: SizedBox( child: SizedBox(
width: width, width: width,
height: height, height: height,
child: Lottie.asset( child: isChan
Assets.lottie.test2, ? Image(
animate: true, image: AssetImage(
repeat: true, Assets.gif.stacyPlain,
), ),
)
: Lottie.asset(
Assets.lottie.test2,
animate: true,
repeat: true,
),
), ),
), ),
); );