diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
index 304732f..1b7e085 100644
--- a/android/app/src/main/res/drawable/launch_background.xml
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -1,12 +1,9 @@
-
-
-
-
+ android:src="@drawable/splash screen.png" />
+
diff --git a/assets/splash screen.png b/assets/splash screen.png
new file mode 100644
index 0000000..77834c6
Binary files /dev/null and b/assets/splash screen.png differ
diff --git a/lib/main.dart b/lib/main.dart
index 58635fc..c052acc 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -11,6 +11,7 @@ import 'package:opso/programs%20screen/summer_of_bitcoin.dart';
import 'package:opso/services/notificationService.dart';
import 'home_page.dart';
import 'package:adaptive_theme/adaptive_theme.dart';
+import 'splash_screen.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
@@ -33,7 +34,7 @@ class OpSoApp extends StatelessWidget {
dark: ThemeData.dark(),
initial: AdaptiveThemeMode.system,
builder: (theme, darkTheme) => MaterialApp(
- initialRoute: '/landing_page',
+ initialRoute: '/splash_screen',
routes: {
"/progarm_page": (context) => const HomePage(),
"/girl_script_summer_of_code": (context) => const GSSOCScreen(),
@@ -47,6 +48,7 @@ class OpSoApp extends StatelessWidget {
const MajorLeagueHackingFellowship(),
"/linux_foundation": (context) => const LinuxFoundation(),
"/landing_page": (context) => const LandingPage(),
+ '/splash_screen': (context) => SplashScreen(),
},
title: 'OpSo',
debugShowCheckedModeBanner: false,
@@ -57,8 +59,9 @@ class OpSoApp extends StatelessWidget {
// visualDensity: VisualDensity.adaptivePlatformDensity,
// ),
home: const HomePage(),
+
),
);
});
}
-}
+}
\ No newline at end of file
diff --git a/lib/splash_screen.dart b/lib/splash_screen.dart
new file mode 100644
index 0000000..ceac0cc
--- /dev/null
+++ b/lib/splash_screen.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/material.dart';
+import 'dart:async';
+
+class SplashScreen extends StatefulWidget {
+ @override
+ _SplashScreenState createState() => _SplashScreenState();
+}
+
+class _SplashScreenState extends State {
+ @override
+ void initState() {
+ super.initState();
+ Timer(Duration(seconds: 3), () {
+ Navigator.of(context).pushReplacementNamed('/landing_page');
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Center(
+ child: Image.asset('assets/splash screen.png'),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/pubspec.yaml b/pubspec.yaml
index 40931d4..3c0f1f4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -85,6 +85,7 @@ flutter:
- assets/projects/gsod/
- assets/projects/sob/
- assets/projects/linux_foundation/
+ - assets/splash screen.png
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see