removed splash, created custom

This commit is contained in:
meylis98 2023-03-13 16:59:05 +05:00
parent 82f1265997
commit 2678e04975
25 changed files with 54 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 68 B

View File

@ -3,7 +3,4 @@
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 68 B

View File

@ -3,7 +3,4 @@
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>

View File

@ -6,7 +6,7 @@
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -2,16 +2,17 @@
"images" : [
{
"filename" : "background.png",
"idiom" : "universal",
"scale" : "1x"
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "darkbackground.png",
"idiom" : "universal"
}
],
"info" : {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 68 B

View File

@ -38,7 +38,7 @@
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="1106" height="986"/>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources>
</document>

View File

@ -48,6 +48,6 @@
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<false/>
</dict>
</plist>

View File

@ -27,7 +27,6 @@ class _LoginScreenState extends State<LoginScreen> {
final AuthService authService = AuthService();
void login() {
debugPrint('EMAIL ${emailController.text}');
authService.login(
loginRequestModel: LoginRequestModel(
email: emailController.text,

View File

@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
import 'package:sapaly_shop/themes/app_theme.dart';
class Onboarding extends StatefulWidget {
static const String routeName = '/onboarding';
const Onboarding({super.key});
@override
State<Onboarding> createState() => _OnboardingState();
}
class _OnboardingState extends State<Onboarding> {
@override
void initState() {
Future.delayed(const Duration(seconds: 5), () {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => const HomeScreen()),
);
});
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppTheme.lightPrimaryColor,
body: Center(
child: Image.asset('assets/images/logoBig.png'),
),
);
}
}

View File

@ -7,6 +7,7 @@ import 'package:sapaly_shop/features/screens/drawer/contacts.dart';
import 'package:sapaly_shop/features/screens/drawer/sapaly_drawer.dart';
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
import 'package:sapaly_shop/features/screens/auth/login/login_screen.dart';
import 'package:sapaly_shop/features/screens/home/onboarding.dart';
import 'package:sapaly_shop/features/screens/settings/settings_screen.dart';
import 'package:sapaly_shop/features/services/auth_service.dart';
import 'package:sapaly_shop/providers/user_provider.dart';
@ -55,9 +56,10 @@ class _MyAppState extends State<MyApp> {
debugShowCheckedModeBanner: false,
theme: AppTheme.appLightTheme,
title: 'Sapaly Mahabat',
initialRoute: '/home',
initialRoute: '/onboarding',
onGenerateRoute: (settings) => generateRoute(settings),
routes: <String, WidgetBuilder>{
'/onboarding': (context) => const Onboarding(),
'/drawer': (context) => SapalyDrawer(),
'/home': (context) => const HomeScreen(),
'/category': (context) => const CategoryScreen(),

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
import 'features/screens/auth/login/login_screen.dart';
import 'features/screens/home/onboarding.dart';
Route<dynamic> generateRoute(RouteSettings routeSettings) {
switch (routeSettings.name) {
@ -11,9 +12,12 @@ Route<dynamic> generateRoute(RouteSettings routeSettings) {
);
case LoginScreen.routeName:
return MaterialPageRoute(
builder: (_) => LoginScreen(),
builder: (_) => const LoginScreen(),
);
case Onboarding.routeName:
return MaterialPageRoute(
builder: (context) => const Onboarding(),
);
default:
return MaterialPageRoute(
settings: routeSettings,