Updated Splash Screen...
@@ -13,7 +13,7 @@
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:theme="@style/NormalTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
|
||||
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 262 KiB |
|
Before Width: | Height: | Size: 699 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 262 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 699 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 6.3 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -7,7 +7,6 @@
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||
<item name="android:windowSplashScreenBackground">#F95F62</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||
<item name="android:windowSplashScreenBackground">#F95F62</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<!-- Use a plain background instead of a splash drawable -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
|
||||
BIN
assets/logo/splash.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 69 B |
@@ -38,7 +38,7 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="399" height="138"/>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
<image name="LaunchBackground" width="1" height="1"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -21,7 +21,9 @@ import 'package:citycards_customer/offer_pass_detail/offer_pass_detail_view.dart
|
||||
import 'package:citycards_customer/privacy/privacy_view.dart';
|
||||
import 'package:citycards_customer/search_offers/bloc/search_offers_listing_bloc.dart';
|
||||
import 'package:citycards_customer/search_offers/view/search_offers_with_listing.dart';
|
||||
import 'package:citycards_customer/splash_screen/views/splash_screen.dart';
|
||||
import 'package:citycards_customer/terms_and_condition/terms_and_condition_view.dart';
|
||||
import 'package:citycards_customer/trail.dart';
|
||||
import 'package:citycards_customer/your_itinerary/view/your_itinerary_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
@@ -34,6 +36,7 @@ import 'route_constants.dart';
|
||||
|
||||
class AppRouter {
|
||||
Route onGenerateRoute(RouteSettings settings) {
|
||||
print('Navigating to route: ${settings.name}');
|
||||
switch (settings.name) {
|
||||
case '/':
|
||||
case RouteConstants.home:
|
||||
@@ -46,10 +49,20 @@ class AppRouter {
|
||||
},
|
||||
);
|
||||
|
||||
case RouteConstants.splash:
|
||||
print('✅ Splash route matched');
|
||||
return MaterialPageRoute(
|
||||
builder: (_) {
|
||||
return SplashScreen();
|
||||
},
|
||||
);
|
||||
|
||||
case RouteConstants.intro:
|
||||
return MaterialPageRoute(builder: (_){
|
||||
return IntroScreensView();
|
||||
});
|
||||
return MaterialPageRoute(
|
||||
builder: (_) {
|
||||
return IntroScreensView();
|
||||
},
|
||||
);
|
||||
case RouteConstants.attractionsPage:
|
||||
final args = settings.arguments as String;
|
||||
return MaterialPageRoute(builder: (_) => AttractionsPage(source: args));
|
||||
@@ -192,19 +205,25 @@ class AppRouter {
|
||||
);
|
||||
|
||||
case RouteConstants.magicItineraryEmptyScreen:
|
||||
return MaterialPageRoute(builder: (_){
|
||||
return MagicItineraryEmptyView();
|
||||
});
|
||||
return MaterialPageRoute(
|
||||
builder: (_) {
|
||||
return MagicItineraryEmptyView();
|
||||
},
|
||||
);
|
||||
|
||||
case RouteConstants.magicItineraryFilledScreen:
|
||||
return MaterialPageRoute(builder: (_){
|
||||
return MagicItineraryFilledView();
|
||||
});
|
||||
return MaterialPageRoute(
|
||||
builder: (_) {
|
||||
return MagicItineraryFilledView();
|
||||
},
|
||||
);
|
||||
|
||||
case RouteConstants.offerPassDetail:
|
||||
return MaterialPageRoute(builder: (_){
|
||||
return OfferPassDetailView();
|
||||
});
|
||||
return MaterialPageRoute(
|
||||
builder: (_) {
|
||||
return OfferPassDetailView();
|
||||
},
|
||||
);
|
||||
|
||||
case RouteConstants.registeredUserHome:
|
||||
return MaterialPageRoute(
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
class RouteConstants {
|
||||
|
||||
|
||||
static const String intro = 'intro';
|
||||
static const String intro = '/intro';
|
||||
static const String splash = '/splash';
|
||||
|
||||
/****************************** HOME SECTION ************************************/
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ class MyApp extends StatelessWidget {
|
||||
],
|
||||
child: MaterialApp(
|
||||
onGenerateRoute: _appRouter.onGenerateRoute,
|
||||
// initialRoute: RouteConstants.intro,
|
||||
home: LottieAnimationScreen(),
|
||||
initialRoute: RouteConstants.splash,
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'City Cards',
|
||||
theme: ThemeData(
|
||||
|
||||
41
lib/splash_screen/views/splash_screen.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:citycards_customer/intro_screens/views/intro_screen_view.dart';
|
||||
|
||||
class SplashScreen extends StatefulWidget {
|
||||
const SplashScreen({super.key});
|
||||
|
||||
@override
|
||||
State<SplashScreen> createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
Future.delayed(const Duration(seconds: 4), () {
|
||||
if (mounted) {
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => IntroScreensView()),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print('🎯 SplashScreen build called');
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF95F62), // Coral red background
|
||||
body: Center(
|
||||
child: Lottie.asset(
|
||||
'assets/intro/animation.json', // Your Lottie file
|
||||
fit: BoxFit.cover,
|
||||
repeat: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -195,48 +195,55 @@
|
||||
//
|
||||
// @override
|
||||
// bool shouldRepaint(covariant CustomPainter oldDelegate) => false;
|
||||
// // }
|
||||
// import 'package:citycards_customer/core/route_constants.dart';
|
||||
// import 'package:citycards_customer/intro_screens/views/intro_screen_view.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:lottie/lottie.dart';
|
||||
//
|
||||
// class SplashScreen extends StatefulWidget {
|
||||
// const SplashScreen({super.key});
|
||||
//
|
||||
// @override
|
||||
// State<SplashScreen> createState() => _SplashScreenState();
|
||||
// }
|
||||
//
|
||||
// class _SplashScreenState extends State<SplashScreen> {
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// timeCounter();
|
||||
// }
|
||||
//
|
||||
// void timeCounter() async {
|
||||
// try {
|
||||
// Future.delayed(const Duration(seconds: 3), () {
|
||||
// Navigator.pushReplacement(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (_) {
|
||||
// return IntroScreensView();
|
||||
// },
|
||||
// ),
|
||||
// );
|
||||
// });
|
||||
// } catch (e) {
|
||||
// print('Error Occurs ${e.toString()}');
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// backgroundColor: const Color(0xFFF95F62),
|
||||
// body: Center(
|
||||
// child: Lottie.asset(
|
||||
// 'assets/intro/anim.json', // your animated Lottie file
|
||||
// fit: BoxFit.cover,
|
||||
// repeat: true,
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
|
||||
class LottieAnimationScreen extends StatefulWidget {
|
||||
const LottieAnimationScreen({super.key});
|
||||
|
||||
@override
|
||||
State<LottieAnimationScreen> createState() => _LottieAnimationScreenState();
|
||||
}
|
||||
|
||||
class _LottieAnimationScreenState extends State<LottieAnimationScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// Delay for animation duration, then navigate to intro screens
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
Navigator.pushReplacementNamed(context, '/intro');
|
||||
});
|
||||
|
||||
// Custom status bar color
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
statusBarColor: Color(0xFFF95F62),
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF95F62),
|
||||
body: Center(
|
||||
child: Lottie.asset(
|
||||
'assets/intro/anim.json', // your animated Lottie file
|
||||
fit: BoxFit.cover,
|
||||
repeat: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,11 +45,11 @@ dependencies:
|
||||
geolocator: ^14.0.2
|
||||
equatable: ^2.0.7
|
||||
syncfusion_flutter_calendar: ^31.2.4
|
||||
flutter_native_splash: ^2.4.7
|
||||
shared_preferences: ^2.5.3
|
||||
flutter_launcher_icons: ^0.14.4
|
||||
flutter_glass_morphism: ^1.0.2
|
||||
lottie: ^3.3.2
|
||||
flutter_native_splash: ^2.4.7
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -108,9 +108,9 @@ flutter:
|
||||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/to/font-from-package
|
||||
flutter_native_splash:
|
||||
color: "#F95F62" # Background color (your coral red)
|
||||
image: assets/logo/logo_city_cards_white.png # Your splash logo
|
||||
color: "#F95F62"
|
||||
background_image: assets/logo/splash.png
|
||||
android_12:
|
||||
color: "#F95F62"
|
||||
image: assets/logo/logo_city_cards_white.png
|
||||
background_image: assets/logo/splash.png
|
||||
web: false
|
||||