From 7d5516c79f2cebb3a0542c21e69cfe8159d93e8b Mon Sep 17 00:00:00 2001 From: samarsajad <142666229+samarsajad@users.noreply.github.com> Date: Sat, 1 Jun 2024 23:12:37 +0530 Subject: [PATCH] splash screen added --- .../main/res/drawable/launch_background.xml | 9 ++---- assets/splash screen.png | Bin 0 -> 17523 bytes lib/main.dart | 7 +++-- lib/splash_screen.dart | 26 ++++++++++++++++++ pubspec.yaml | 1 + 5 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 assets/splash screen.png create mode 100644 lib/splash_screen.dart 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 0000000000000000000000000000000000000000..77834c6324f9645f6676fab1e3114c44951d4652 GIT binary patch literal 17523 zcmeI12T)W0md7uI-a?lil_pIQQKSY%K;W-PQ4o-bh%^Q15ki6>y$OmaDj--ukbrNJm2Y&$87+?lK*nh2Gzaik_;NtkTc(}MYxp;Z__;`7EdHDpO0(|^J{Jgw^ zB7#CtVPO$rJ^@iNQDHIgZ{c4b!uIP*2nP>%p)fx$KX~-NxmZnr2oJ{*c5evVZh&2c z4I;wEY6D;Zz{UyQ?XMgD*Tu#T;o#)r=Hcbz2T!OK2H3&xX6Jx#a&mBhXGeqo2RKAH zMR)B#!X;+s!M!_3T<3b$BOb-0Rm~Fiy=0{W7lLDX`6PEpNy{j!sP0iy*FAVh@36js z*)ekq%i~to4vweKI60qn@x17D$=k=*FC;W9JOX(wGVVrvLSj;KO7^YWId^jJ-pea0 ze*EO=vy#&1FRN>6U)8;SQ{U3s*51+izUxC@|G?l7VR&S8nn;@YIy?7meu46RZT-i_ zCiUmmFTdCT$Y0(1n`i&QFA>l$b`CJ4+`s%{V~+q0B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mlg_gqC-ggVrvrW}; zbZy(ER2Fc|(vk%JT+YD?ou+6|W1KSMzb2Gpi F`4?EqB~JhV literal 0 HcmV?d00001 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