This commit is contained in:
M
2020-06-20 10:10:00 +03:00
parent 719842964b
commit 81cee186db
94 changed files with 3786 additions and 3001 deletions
+16
View File
@@ -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;
}
+23
View File
@@ -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;
}
+10
View File
@@ -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;
}