stack_wallet/lib/pages/loading_view.dart

57 lines
1.9 KiB
Dart
Raw Normal View History

2022-08-26 08:11:35 +00:00
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
import 'package:stackwallet/utilities/assets.dart';
2023-02-23 17:25:32 +00:00
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/background.dart';
2023-02-23 17:25:32 +00:00
import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/rounded_container.dart';
2022-08-26 08:11:35 +00:00
class LoadingView extends StatelessWidget {
const LoadingView({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final size = MediaQuery.of(context).size;
2023-02-23 17:25:32 +00:00
final width = min(size.width, size.height) * 0.5;
return Background(
child: Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
body: Container(
color: Theme.of(context).extension<StackColors>()!.background,
child: Center(
2023-02-23 17:25:32 +00:00
child: ConditionalParent(
condition:
Theme.of(context).extension<StackColors>()!.themeType ==
ThemeType.oledBlack,
builder: (child) => RoundedContainer(
color: const Color(0xFFDEDEDE),
radiusMultiplier: 100,
width: width * 1.35,
height: width * 1.35,
child: child,
),
child: SizedBox(
width: width,
child: Lottie.asset(
Assets.lottie.test2,
animate: true,
repeat: true,
),
),
2022-08-26 08:11:35 +00:00
),
// child: Image(
// image: AssetImage(
// Assets.png.splash,
// ),
// width: MediaQuery.of(context).size.width * 0.5,
// ),
2022-08-26 08:11:35 +00:00
),
),
),
);
}
}