forked from eatvio/eatvio_app
New screen names
This commit is contained in:
54
lib/main.dart
Normal file
54
lib/main.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'core/app_export.dart';
|
||||
|
||||
var globalMessengerKey = GlobalKey<ScaffoldMessengerState>();
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
Future.wait([
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
]),
|
||||
PrefUtils().init()
|
||||
]).then((value) {
|
||||
runApp(MyApp());
|
||||
});
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (context) => ThemeBloc(
|
||||
ThemeState(
|
||||
themeType: PrefUtils().getThemeData(),
|
||||
),
|
||||
),
|
||||
child: BlocBuilder<ThemeBloc, ThemeState>(
|
||||
builder: (context, state) {
|
||||
return MaterialApp(
|
||||
theme: theme,
|
||||
title: 'eatvio_app',
|
||||
navigatorKey: NavigatorService.navigatorKey,
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: [
|
||||
AppLocalizationDelegate(),
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: [
|
||||
Locale(
|
||||
'en',
|
||||
'',
|
||||
),
|
||||
],
|
||||
initialRoute: AppRoutes.initialRoute,
|
||||
routes: AppRoutes.routes,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user