How to use dispose with flutter bloc?

Issue I have this stateful widget which uses a bloc called RecorderBloc: class _RecorderScreenWidgetState extends State<RecorderScreenWidget> { late final RecorderBloc _recorderBloc; @override void initState() { super.initState(); _recorderBloc = serviceLocator.get<RecorderBloc>(); } @override void dispose() { _recorderBloc.add(RecorderEvent.dispose()); super.dispose(); } @override Widget build(BuildContext

Continue reading