Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@felangel
Created July 9, 2019 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felangel/4cad77b0165137637d8311b0a3c3a655 to your computer and use it in GitHub Desktop.
Save felangel/4cad77b0165137637d8311b0a3c3a655 to your computer and use it in GitHub Desktop.
[flutter_bloc_0.19.0] MultiRepositoryProvider
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiRepositoryProvider(
providers: [
RepositoryProvider<RepositoryA>(
builder: (context) => RepositoryA(),
),
RepositoryProvider<RepositoryB>(
builder: (context) => RepositoryB(),
),
RepositoryProvider<RepositoryC>(
builder: (context) => RepositoryC(),
),
],
child: ChildA(),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment