Created
July 9, 2019 02:48
-
-
Save felangel/30c6cc333ab1c850ca1d4485f18e7cf5 to your computer and use it in GitHub Desktop.
[flutter_bloc_0.19.0] MultiBlocProvider
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
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MultiBlocProvider( | |
providers: [ | |
BlocProvider<BlocA>( | |
builder: (BuildContext context) => BlocA(), | |
), | |
BlocProvider<BlocB>( | |
builder: (BuildContext context) => BlocB(), | |
), | |
BlocProvider<BlocC>( | |
builder: (BuildContext context) => BlocC(), | |
), | |
], | |
child: ChildA(), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment