Open
Description
Hi. I get this error using your code, but with a newer version of the flutter_bloc: ^0.21.0
I downgraded to 0.11.0 and it doesn't return the same error.
Update:
I just realized that this is just a proof of concept, but if you want to update the code to the current version of the flutter_bloc, you might want to change _MyHomePageState class to this:
class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return BlocProvider<CounterBloc>( builder: (context) => CounterBloc(), child: CounterWidget(widget: widget), ); } // BlocProvider also handles disposing the CounterBloc automatically }
Metadata
Metadata
Assignees
Labels
No labels