|
|
@ -124,8 +124,7 @@ class AccountsBloc extends Bloc implements AccountsBlocEvents, AccountsBlocState |
|
|
|
BehaviorSubject<List<Account>> accounts = BehaviorSubject<List<Account>>.seeded([]); |
|
|
|
BehaviorSubject<List<Account>> accounts = BehaviorSubject<List<Account>>.seeded([]); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
BehaviorSubject<Account?> activeAccount = BehaviorSubject<Account?>() |
|
|
|
BehaviorSubject<Account?> activeAccount = BehaviorSubject<Account?>(); |
|
|
|
..distinct((final current, final next) => current?.id != next?.id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void addAccount(final Account account) { |
|
|
|
void addAccount(final Account account) { |
|
|
@ -161,8 +160,10 @@ class AccountsBloc extends Bloc implements AccountsBlocEvents, AccountsBlocState |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void setActiveAccount(final Account account) { |
|
|
|
void setActiveAccount(final Account account) { |
|
|
|
|
|
|
|
if (activeAccount.valueOrNull != account) { |
|
|
|
activeAccount.add(account); |
|
|
|
activeAccount.add(account); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void updateAccount(final Account account) { |
|
|
|
void updateAccount(final Account account) { |
|
|
|