Skip to content

Commit

Permalink
I have made the loading component and have done the necessary changes…
Browse files Browse the repository at this point in the history
… for styling
  • Loading branch information
vedang8 committed Oct 2, 2023
1 parent 572999c commit 138dc35
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 42 deletions.
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> {
);
});
}
}
}
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -244,18 +244,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -276,10 +276,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
Expand Down

0 comments on commit 138dc35

Please sign in to comment.