Created
November 9, 2022 16:58
-
-
Save aniekan12/8c6061d06efe01a92760b98807e32ba7 to your computer and use it in GitHub Desktop.
This file contains 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:shopping_cart_with_bloc/core/bloc/shopping_home_bloc.dart'; | |
import 'package:shopping_cart_with_bloc/presentation/shopping_home/view.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( | |
create: (_) => ShoppingHomeBloc()..add(GetShoppingItems()), | |
child: const ShoppingHome()), | |
], | |
child: MaterialApp( | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: const ShoppingHome(), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment