Skip to content

Instantly share code, notes, and snippets.

@ibrajix
Created December 9, 2022 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibrajix/e9a2563b6379faa6293be7e418fa8e65 to your computer and use it in GitHub Desktop.
Save ibrajix/e9a2563b6379faa6293be7e418fa8e65 to your computer and use it in GitHub Desktop.
splash_screen
@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