I have one bit older flutter project I started to look into again and wanted to update into the latest version, however there seems to be a breaking change between 0.8.0 and 0.9.0 but I didn't find any docs about it what it could be?
Happy to provide further examples but not too sure what would be needed in this case
Example:
error: 'ActivityBloc.mapEventToState' ('Stream<ActivityState> Function(ActivityEvent, dynamic)') isn't a valid override of 'Bloc.mapEventToState' ('Stream<ActivityState> Function(ActivityEvent)'). (invalid_override at [appname] lib/bloc/activity_bloc.dart:42)
Hi @Luppakorva 馃憢
Thanks for opening an issue! Can you provide a link to the repo or the snippet of activity_bloc.dart?
Hi there!
Absolutely. Here you go: https://gist.github.com/Luppakorva/5adefa659b109b4d708893b6d1668708
@Luppakorva the mapEventToState signature changed to not have a currentState passed as a parameter since you can already access currentState from anywhere in the bloc.
You should just be able to change
Stream<ActivityState> mapEventToState(currentState, event) async* {
...
}
to
Stream<ActivityState> mapEventToState(event) async* {
...
}
@felangel thank you so much! Both from the prompt reply and awesome support, you made my day :).
Most helpful comment
@felangel thank you so much! Both from the prompt reply and awesome support, you made my day :).