Skip to content

Instantly share code, notes, and snippets.



Created Jul 9, 2019
What would you like to do?
[flutter_bloc_0.19.0] Nested BlocProviders
class MyWidget extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider<BlocA>(
builder: (BuildContext context) => BlocA(),
child: BlocProvider<BlocB>(
builder: (BuildContext context) => BlocB(),
child: 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
You can’t perform that action at this time.