Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have made the loading component and have done the necessary changes… #11

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 46 additions & 34 deletions lib/Screens/splace_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class SplaceScreen extends StatefulWidget {
}

class _SplaceScreenState extends State<SplaceScreen> {
bool isLoading = true; // making a loading variable

@override
void initState() {
super.initState();
Expand All @@ -24,47 +26,57 @@ class _SplaceScreenState extends State<SplaceScreen> {
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<Color>(Colors.blue),
),
],
),
);
}

void timer(BuildContext context) {
Timer(const Duration(seconds: 3), () {
setState(() {
isLoading = false; // after 3s, it must stop
});
Navigator.pushReplacement(
context,
MaterialPageRoute(
Expand All @@ -73,4 +85,4 @@ class _SplaceScreenState extends State<SplaceScreen> {
);
});
}
}
}
Loading
Loading