forked from eatvio/eatvio_app
37 lines
1.2 KiB
Dart
37 lines
1.2 KiB
Dart
import 'package:eatvio_app/core/app_config.dart';
|
|
import 'package:eatvio_app/core/app_initializer.dart';
|
|
import 'package:eatvio_app/core/app_router.dart';
|
|
import 'package:eatvio_app/core/locator_service.dart';
|
|
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:flutter_portal/flutter_portal.dart';
|
|
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
|
|
|
|
Future<void> main() async {
|
|
await AppInitializer.initialize(buildType: AppBuildType.dev);
|
|
await AppInitializer.runAppWithSentry(() => runApp(const MyApp()));
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MultiBlocProvider(
|
|
providers: sl<AppConfig>().globalBlocProviders,
|
|
child: Portal(
|
|
child: KeyboardDismisser(
|
|
child: MaterialApp.router(
|
|
theme: ThemeHelper().themeData(),
|
|
routerConfig: AppRouter.appRouter,
|
|
debugShowCheckedModeBanner: false,
|
|
localizationsDelegates: sl<AppConfig>().localizationDelegates,
|
|
supportedLocales: sl<AppConfig>().supportedLocales,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|