Closed simonckenyon closed 4 years ago
Yes, the docs were outdated. Thanks for noticing. It should be this:
var store = Store<AppState>(
initialState: AppState.initialState(),
errorObserver: MyErrorObserver<AppState>(),
);
class MyErrorObserver<St> implements ErrorObserver<St> {
@override
bool observe(Object error, StackTrace stackTrace, ReduxAction<St> action, Store store) {
print("Error thrown during $action: $error");
return true;
}
}
Fix version: 2.12.3
If I define an errorObserver as per the documentation I get a compilation error:
The argument type 'bool Function(Object, ReduxAction, Store, Object, int)' can't be assigned to the parameter type 'ErrorObserver'.