2022-04-22 22:08:59 +02:00
|
|
|
import 'package:flutter/services.dart';
|
2022-04-18 15:57:03 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-04-23 09:20:15 +02:00
|
|
|
import 'package:page_transition/page_transition.dart';
|
|
|
|
import 'package:animated_splash_screen/animated_splash_screen.dart';
|
2022-04-18 15:57:03 +02:00
|
|
|
|
2022-04-22 22:08:59 +02:00
|
|
|
import 'package:nekoya_flutter/screens/products.dart';
|
|
|
|
|
2022-04-18 15:57:03 +02:00
|
|
|
void main() {
|
2022-04-22 22:08:59 +02:00
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
2022-04-23 09:20:15 +02:00
|
|
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
|
|
|
|
.then((_) {
|
2022-04-22 22:08:59 +02:00
|
|
|
runApp(const MyApp());
|
|
|
|
});
|
2022-04-18 15:57:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
const MyApp({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-04-23 09:20:15 +02:00
|
|
|
return MaterialApp(
|
|
|
|
home: AnimatedSplashScreen(
|
|
|
|
splash: 'assets/logo_transparent.webp',
|
|
|
|
pageTransitionType: PageTransitionType.fade,
|
2022-04-23 18:47:40 +02:00
|
|
|
backgroundColor: const Color(0xff1b1c1e),
|
2022-04-23 09:20:15 +02:00
|
|
|
splashIconSize: 150,
|
2022-04-23 18:47:40 +02:00
|
|
|
nextScreen: const Products(),
|
2022-04-23 09:20:15 +02:00
|
|
|
),
|
|
|
|
debugShowCheckedModeBanner: false,
|
2022-04-18 15:57:03 +02:00
|
|
|
);
|
|
|
|
}
|
2022-04-23 09:20:15 +02:00
|
|
|
}
|