Skip to content

Instantly share code, notes, and snippets.

@felangel
Created July 9, 2019 02:29
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/27535769095ceb09cb60b2f574aae7b4 to your computer and use it in GitHub Desktop.
Save felangel/27535769095ceb09cb60b2f574aae7b4 to your computer and use it in GitHub Desktop.
[flutter_bloc_0.19.0] BlocProvider value constructor
Navigator.of(context).push(
MaterialPageRoute<MyPage>(
builder: (context) {
return BlocProvider.value(
value: BlocProvider.of<MyBloc>(context),
child: MyPage(),
);
},
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment