2020-06-20 07:10:00 +00:00
|
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
|
|
|
|
part 'authentication_store.g.dart';
|
|
|
|
|
|
|
|
class AuthenticationStore = AuthenticationStoreBase with _$AuthenticationStore;
|
|
|
|
|
2022-12-05 16:40:53 +00:00
|
|
|
enum AuthenticationState { uninitialized, installed, allowed }
|
2020-06-20 07:10:00 +00:00
|
|
|
|
|
|
|
abstract class AuthenticationStoreBase with Store {
|
|
|
|
AuthenticationStoreBase() : state = AuthenticationState.uninitialized;
|
|
|
|
|
|
|
|
@observable
|
|
|
|
AuthenticationState state;
|
|
|
|
|
|
|
|
@action
|
|
|
|
void installed() => state = AuthenticationState.installed;
|
|
|
|
|
|
|
|
@action
|
|
|
|
void allowed() => state = AuthenticationState.allowed;
|
|
|
|
}
|