|
|
|
|
@ -47,7 +47,7 @@ class _SplashAnimationScreenState extends State<SplashAnimationScreen> with Sing
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
body: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Lottie.asset(AppAnimations.splashLaunching, controller: _controller, onLoaded: (composition) {
|
|
|
|
|
Lottie.asset(AppAnimations.splashLaunching, controller: _controller, width: double.infinity, height: double.infinity, onLoaded: (composition) {
|
|
|
|
|
_controller
|
|
|
|
|
..duration = composition.duration
|
|
|
|
|
..forward(); // Start the animation
|
|
|
|
|
@ -83,11 +83,11 @@ class _AnimatedScreenState extends State<AnimatedScreen> with TickerProviderStat
|
|
|
|
|
_controller = AnimationController(vsync: this);
|
|
|
|
|
_controller.addListener(() {
|
|
|
|
|
if (_controller.status == AnimationStatus.completed) {
|
|
|
|
|
Navigator.of(context).pushReplacement(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: LoginScreen(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
// Navigator.of(context).pushReplacement(
|
|
|
|
|
// FadePage(
|
|
|
|
|
// page: LoginScreen(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -144,60 +144,60 @@ class _AnimatedScreenState extends State<AnimatedScreen> with TickerProviderStat
|
|
|
|
|
..forward(); // Start the animation
|
|
|
|
|
}, repeat: false, reverse: false, frameRate: FrameRate(60), fit: BoxFit.fill)
|
|
|
|
|
.center,
|
|
|
|
|
// Lottie.asset(AppAnimations.loadingAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill).center,
|
|
|
|
|
//
|
|
|
|
|
// AnimatedContainer(
|
|
|
|
|
// duration: Duration(milliseconds: 500),
|
|
|
|
|
// width: screenSize.width,
|
|
|
|
|
// height: screenSize.height,
|
|
|
|
|
// color: isRipple ? AppColors.primaryRedColor : AppColors.whiteColor,
|
|
|
|
|
// ),
|
|
|
|
|
//
|
|
|
|
|
// AnimatedBuilder(
|
|
|
|
|
// animation: _moveController,
|
|
|
|
|
// builder: (context, child) {
|
|
|
|
|
// final pos = _positionAnimation.value;
|
|
|
|
|
// return Positioned(
|
|
|
|
|
// left: (screenSize.width * .75) * (pos.dx),
|
|
|
|
|
// top: (screenSize.height * 0.75) * (pos.dy),
|
|
|
|
|
// child: Transform.rotate(
|
|
|
|
|
// angle: -120 * 3.1415927 / 150, // convert degrees to radians
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: 400,
|
|
|
|
|
// height: 653,
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Color(0xffED1C2B),
|
|
|
|
|
// borderRadius: BorderRadius.circular(330),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// // Expanding white circle
|
|
|
|
|
// AnimatedBuilder(
|
|
|
|
|
// animation: _expandController,
|
|
|
|
|
// builder: (context, child) {
|
|
|
|
|
// return Center(
|
|
|
|
|
// child: Transform.scale(
|
|
|
|
|
// scale: _expandAnimation.value,
|
|
|
|
|
// child: Opacity(
|
|
|
|
|
// opacity: 1.0, //- _expandAnimation.value.clamp(0.0, 1.0),
|
|
|
|
|
// child: Container(
|
|
|
|
|
// decoration: const BoxDecoration(
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// shape: BoxShape.circle,
|
|
|
|
|
// // border: Border.fromBorderSide(BorderSide(
|
|
|
|
|
// // width: 0,
|
|
|
|
|
// // color: Color(0xffED1C2B),
|
|
|
|
|
// // )
|
|
|
|
|
// )),
|
|
|
|
|
// ),
|
|
|
|
|
// // ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
Lottie.asset(AppAnimations.loadingAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill).center,
|
|
|
|
|
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
duration: Duration(milliseconds: 500),
|
|
|
|
|
width: screenSize.width,
|
|
|
|
|
height: screenSize.height,
|
|
|
|
|
color: isRipple ? AppColors.primaryRedColor : AppColors.whiteColor,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
AnimatedBuilder(
|
|
|
|
|
animation: _moveController,
|
|
|
|
|
builder: (context, child) {
|
|
|
|
|
final pos = _positionAnimation.value;
|
|
|
|
|
return Positioned(
|
|
|
|
|
left: ((screenSize.width * .75) * (pos.dx)).h,
|
|
|
|
|
top: ((screenSize.height * 0.75) * (pos.dy)).h,
|
|
|
|
|
child: Transform.rotate(
|
|
|
|
|
angle: -120 * 3.1415927 / 150, // convert degrees to radians
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 400.h,
|
|
|
|
|
height: 653.h,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xffED1C2B),
|
|
|
|
|
borderRadius: BorderRadius.circular(330.h),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// Expanding white circle
|
|
|
|
|
AnimatedBuilder(
|
|
|
|
|
animation: _expandController,
|
|
|
|
|
builder: (context, child) {
|
|
|
|
|
return Center(
|
|
|
|
|
child: Transform.scale(
|
|
|
|
|
scale: _expandAnimation.value,
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 1.0, //- _expandAnimation.value.clamp(0.0, 1.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
// border: Border.fromBorderSide(BorderSide(
|
|
|
|
|
// width: 0,
|
|
|
|
|
// color: Color(0xffED1C2B),
|
|
|
|
|
// )
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
// ),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// AnimatedBuilder(
|
|
|
|
|
// animation: _expandController,
|
|
|
|
|
// builder: (context, child) {
|
|
|
|
|
|