Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //main class
- Widget build(BuildContext context) {
- return MultiBlocProvider(
- providers: [
- .....
- BlocProvider<AuthenticationBloc>(
- create: (BuildContext context){
- return AuthenticationBloc(userRepository: userRepository);
- }
- ),
- BlocProvider<CartBloc>(
- create: (BuildContext context){
- return CartBloc(
- cartRepository: cartRepository,
- userBloc: BlocProvider.of<UserBloc>(context)
- );
- },
- )
- ],
- child: MaterialApp(
- routes: {
- "/pricelist" : (context) => PricelistPage(),
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement