2020-06-20 10:10:00 +03:00
|
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
|
|
|
|
part 'authentication_store.g.dart';
|
|
|
|
|
|
|
|
class AuthenticationStore = AuthenticationStoreBase with _$AuthenticationStore;
|
|
|
|
|
2022-12-05 18:40:53 +02:00
|
|
|
enum AuthenticationState { uninitialized, installed, allowed }
|
2020-06-20 10:10:00 +03: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;
|
|
|
|
}
|