Skip to content

Instantly share code, notes, and snippets.

@felangel felangel/main.dart
Created Jul 9, 2019

What would you like to do?
[flutter_bloc_0.19.0] Old BlocProvider
class MyWidget extends StatefulWidget {
State<MyWidget> createState() => _MyWidgetState();
class _MyWidgetState extends State<MyWidget> {
MyBloc _myBloc;
void initState() {
_myBloc = MyBloc();
Widget build(BuildContext context) {
return BlocProvider(
bloc: _myBloc,
child: MyChild(),
void dispose() {
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.