27 lines
768 B
Dart
27 lines
768 B
Dart
|
|
import 'package:aman_kassa_flutter/core/models/halyk_post_session.dart';
|
|
import 'package:aman_kassa_flutter/redux/state/bank_state.dart';
|
|
import 'package:meta/meta.dart';
|
|
import 'package:redux/redux.dart';
|
|
import 'package:redux_thunk/redux_thunk.dart';
|
|
|
|
import '../store.dart';
|
|
|
|
@immutable
|
|
class SetBankStateAction {
|
|
final BankState bankState;
|
|
SetBankStateAction(this.bankState);
|
|
}
|
|
|
|
ThunkAction<AppState> saveData(String login, String password) {
|
|
return (Store<AppState> store) async {
|
|
store.dispatch(SetBankStateAction(BankState(login: login, password: password)));
|
|
};
|
|
}
|
|
|
|
ThunkAction<AppState> setHalykSession(HalykPosSession session) {
|
|
return (Store<AppState> store) async {
|
|
store.dispatch(SetBankStateAction(BankState(session: session)));
|
|
};
|
|
}
|