mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
TMP 4
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:cake_wallet/core/wallet_base.dart';
|
||||
import 'package:cake_wallet/store/authentication_store.dart';
|
||||
|
||||
part 'app_store.g.dart';
|
||||
|
||||
class AppStore = AppStoreBase with _$AppStore;
|
||||
|
||||
abstract class AppStoreBase with Store {
|
||||
AppStoreBase({this.authenticationStore});
|
||||
|
||||
AuthenticationStore authenticationStore;
|
||||
|
||||
@observable
|
||||
WalletBase wallet;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
||||
part 'authentication_store.g.dart';
|
||||
|
||||
class AuthenticationStore = AuthenticationStoreBase with _$AuthenticationStore;
|
||||
|
||||
enum AuthenticationState { uninitialized, installed, allowed, denied }
|
||||
|
||||
abstract class AuthenticationStoreBase with Store {
|
||||
AuthenticationStoreBase() : state = AuthenticationState.uninitialized;
|
||||
|
||||
@observable
|
||||
AuthenticationState state;
|
||||
|
||||
@action
|
||||
void installed() => state = AuthenticationState.installed;
|
||||
|
||||
@action
|
||||
void allowed() => state = AuthenticationState.allowed;
|
||||
|
||||
@action
|
||||
void denied() => state = AuthenticationState.denied;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
||||
part 'wallet_list_store.g.dart';
|
||||
|
||||
class WalletListStore = WalletListStoreBase with _$WalletListStore;
|
||||
|
||||
abstract class WalletListStoreBase with Store {
|
||||
@observable
|
||||
Object state;
|
||||
}
|
||||
Reference in New Issue
Block a user