mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
TMP 4
This commit is contained in:
parent
719842964b
commit
81cee186db
94 changed files with 3786 additions and 3001 deletions
23
lib/store/authentication_store.dart
Normal file
23
lib/store/authentication_store.dart
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue