Created
December 9, 2022 15:16
-
-
Save ibrajix/e9a2563b6379faa6293be7e418fa8e65 to your computer and use it in GitHub Desktop.
splash_screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
toolbarHeight: 0, | |
backgroundColor: Colors.black, | |
elevation: 0, | |
), | |
body: Stack( | |
alignment: Alignment.center, | |
children: [ | |
BlocBuilder<SplashCubit, SplashState>( | |
builder: (context, state) { | |
return AnimatedPositioned( | |
curve: Curves.fastLinearToSlowEaseIn, | |
duration: const Duration(milliseconds: 1600), | |
bottom: state.animate ? MediaQuery.of(context).size.height/2 : 0, | |
child: Center( | |
child: Image.asset( | |
Images.splashImage, | |
height: 50, | |
width: 50, | |
), | |
), | |
); | |
} | |
) | |
], | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment