Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

access blocprovider inside a dispose method in flutter

late FiltersBloc filtersBloc;

@override
Widget build(BuildContext context){
  filtersBloc = BlocProvider.of<FiltersBloc>(context);
  return ...
}

@override
void dispose() {
  filtersBloc.dispatch();
  super.dispose();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #blocprovider #dispose #method #flutter
ADD COMMENT
Topic
Name
2+3 =