31 lines
894 B
Dart
31 lines
894 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:maibu_satabot_v2/features/auth/presentation/bloc/auth_cubit.dart';
|
|
|
|
import 'core/di/injection.dart';
|
|
import 'features/auth/presentation/bloc/login_bloc.dart';
|
|
import 'features/auth/presentation/bloc/login_cubit.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await init();
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
sl<AuthCubit>().appStarted();
|
|
return MultiBlocProvider(
|
|
providers: [
|
|
BlocProvider<LoginBloc>(create: (_) => sl<LoginBloc>()),
|
|
BlocProvider<LoginCubit>(create: (_) => sl<LoginCubit>()),
|
|
],
|
|
child: MaterialApp.router(routerConfig: sl<GoRouter>()),
|
|
);
|
|
}
|
|
}
|