panti-asuhan-app/lib/main.dart

41 lines
1.1 KiB
Dart
Raw Normal View History

2023-03-30 07:34:12 +00:00
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:stacked_services/stacked_services.dart';
2023-05-18 08:04:03 +00:00
import 'app/app.dialogs.dart';
2023-03-30 07:34:12 +00:00
import 'app/app.locator.dart';
import 'app/app.router.dart';
import 'app/themes/app_theme.dart';
Future main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
await setupAllLocator();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Perumahan Mutiara Alga',
theme: appTheme,
debugShowCheckedModeBanner: false,
navigatorKey: StackedService.navigatorKey,
onGenerateRoute: StackedRouter().onGenerateRoute,
builder: EasyLoading.init(),
);
}
}
Future<void> setupAllLocator() async {
await setupLocator();
2023-05-18 08:04:03 +00:00
setupDialogUi();
2023-03-30 07:34:12 +00:00
// setupBottomsheetUi();
// setupSnackbarUi();
}