我有这个动作
Future<void> signUpAction(Store<AppState> store) async {
try {
// ...
} catch (e) {
// ..
}
}
我像这样发送它
store.dispatch(signUpAction);
现在,如果我想传递两个参数,我该怎么做?因为那里已经有一个参数。
我试过这个
Future<void> signUpAction(Store<AppState> store, email, password) async {
try {
// ...
} catch (e) {
// ..
}
}
但是然后在调度时,如果我这样做
store.dispatch(signUpAction("some@email.com", "somEPa55word!"));
它说 singUpAction 需要 3 个参数,所以我不太清楚如何只传递这两个
谢谢