mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 18:07:44 +00:00
24 lines
601 B
Dart
24 lines
601 B
Dart
|
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;
|
||
|
}
|