Added a Custom Splash Screen (WIP)
This commit is contained in:
parent
6fb89fe68e
commit
c8b748cb27
1 changed files with 14 additions and 5 deletions
|
@ -1,11 +1,14 @@
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:page_transition/page_transition.dart';
|
||||
import 'package:animated_splash_screen/animated_splash_screen.dart';
|
||||
|
||||
import 'package:nekoya_flutter/screens/products.dart';
|
||||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]).then((_) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
|
||||
.then((_) {
|
||||
runApp(const MyApp());
|
||||
});
|
||||
}
|
||||
|
@ -15,9 +18,15 @@ class MyApp extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
home: Products(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
return MaterialApp(
|
||||
home: AnimatedSplashScreen(
|
||||
splash: 'assets/logo_transparent.webp',
|
||||
pageTransitionType: PageTransitionType.fade,
|
||||
backgroundColor: Color(0xff1b1c1e),
|
||||
splashIconSize: 150,
|
||||
nextScreen: Products(),
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue