Last active
October 10, 2021 18:11
-
-
Save vaygeth89/9f9fa941639ed26d0c4215b8dce66702 to your computer and use it in GitHub Desktop.
main.dart
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/fake_account_api_service.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( | |
FakeAccountAPIService(), | |
)), | |
], | |
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