Created
October 23, 2021 08:21
-
-
Save vaygeth89/a0fcb066e944fdd2aca85c930182d20f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'package:tutorial_flutter_minimalist_authentication/cubit/user_authentication_cubit.dart'; | |
| import 'package:tutorial_flutter_minimalist_authentication/repositories/api/account_api_repository.dart'; | |
| import 'package:tutorial_flutter_minimalist_authentication/routes/routes.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MultiBlocProvider( | |
| providers: [ | |
| BlocProvider<UserAuthenticationCubit>( | |
| lazy: false, | |
| create: (_) => UserAuthenticationCubit( | |
| AccountApiRepository(), | |
| )), | |
| ], | |
| child: MaterialApp( | |
| title: 'Flutter Demo', | |
| theme: ThemeData( | |
| primarySwatch: Colors.blue, | |
| ), | |
| onGenerateRoute: Routes.generateRoute, | |
| )); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment