Skip to content

Instantly share code, notes, and snippets.

@felangel
Last active July 9, 2019 02:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save felangel/6c6b17e8d1973295824b3f8a5cfa9ee4 to your computer and use it in GitHub Desktop.
[flutter_bloc_0.19.0] BlocProvider Default Constructor
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocProvider(
builder: (BuildContext context) => MyBloc(),
child: MyChild(),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment