Closed leonardo2204 closed 4 years ago
Oi Leonardo. Esse erro:
"The store state is not compatible with WaitAction."
Significa que você não preparou o seu state corretamente. Veja essa explicação:
For this to work, your store state must have a Wait
field named wait
, and then your state class must have a copy
or a copyWith
method which copies this field as a named parameter.
For example:
class AppState {
final Wait wait;
...
AppState({this.wait, ...});
AppState copy({Wait wait, ...}) => AppState(wait: wait, ...);
}
Ou seja, o seu state precisa declarar o campo wait
, e também o método copy
, tal como mostrado acima. Se você ainda tiver problemas, cole aqui pra mim o código da sua classe AppState
.
Hey @marcglasberg, first of all, thanks for the great work here!
I'm trying to figure out how can I call before/after with WithAction on a subclassed state (https://github.com/marcglasberg/async_redux#action-subclassing).
Using the example in the readme, that would be:
Doing so I get:
Is it possible to make
before()
andafter()
dispatch from the right state?Valeu Marcelo 🇧🇷