From cd8b604cf754c4bd0e0b7f5fc976ea823a6b9e5e Mon Sep 17 00:00:00 2001 From: Vedang Joshi <108025619+vedang8@users.noreply.github.com> Date: Sat, 14 Oct 2023 11:17:21 +0530 Subject: [PATCH] Update splace_screen.dart --- lib/Screens/splace_screen.dart | 78 ++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/lib/Screens/splace_screen.dart b/lib/Screens/splace_screen.dart index 766ba2f..46c2334 100644 --- a/lib/Screens/splace_screen.dart +++ b/lib/Screens/splace_screen.dart @@ -13,6 +13,8 @@ class SplaceScreen extends StatefulWidget { } class _SplaceScreenState extends State { + bool isLoading = true; // making a loading variable + @override void initState() { super.initState(); @@ -24,47 +26,57 @@ class _SplaceScreenState extends State { SizeConfig().init(context); return Scaffold( backgroundColor: Color.fromRGBO(241, 243, 244, 1), - body: Container( - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/LOGO.png', - width: 130, - height: 130, - ), - SizedBox( - height: 30, - ), - Text( - 'DU Hacks', - style: kRalewayMedium.copyWith( - fontSize: SizeConfig.blockSizeHorizontal! * 5, - color: kBlue), - ), - SizedBox( - height: 5, + body: Stack( + alignment: Alignment.center, + children: [ + Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Your app's logo or splash image + Image.asset( + 'assets/images/LOGO.png', + width: 150, // Adjust the size to your preference + height: 150, + ), + SizedBox(height: 30), + Text( + 'DU Hacks', + style: TextStyle( + fontSize: 36, // Adjust the font size + fontWeight: FontWeight.bold, + color: Colors.blue, // Use a professional color + ), + ), + SizedBox(height: 10), + Text( + 'Get your creative hats on and join us on this\nincredible ride to build something out of the box.', + style: TextStyle( + fontSize: 16, // Adjust the font size + color: Colors.grey, // Use a neutral color + ), + textAlign: TextAlign.center, + ), + SizedBox(height: 50), + ], ), - Text( - 'Get your creative hats on and join us on this\n incredible ride to build something out of the box.', - style: kRalewayMedium.copyWith( - fontSize: SizeConfig.blockSizeHorizontal! * 3, - ), - textAlign: TextAlign.center, - ), - SizedBox( - height: 50, - ), - ], + ), ), - ), + if (isLoading) + CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.blue), + ), + ], ), ); } void timer(BuildContext context) { Timer(const Duration(seconds: 3), () { + setState(() { + isLoading = false; // after 3s, it must stop + }); Navigator.pushReplacement( context, MaterialPageRoute(