diff --git a/lib/store/authentication_store.dart b/lib/store/authentication_store.dart index b734d7ac..815b1ed6 100644 --- a/lib/store/authentication_store.dart +++ b/lib/store/authentication_store.dart @@ -4,7 +4,7 @@ part 'authentication_store.g.dart'; class AuthenticationStore = AuthenticationStoreBase with _$AuthenticationStore; -enum AuthenticationState { uninitialized, installed, allowed } +enum AuthenticationState { uninitialized, installed, allowed, _reset } abstract class AuthenticationStoreBase with Store { AuthenticationStoreBase() : state = AuthenticationState.uninitialized; @@ -13,8 +13,14 @@ abstract class AuthenticationStoreBase with Store { AuthenticationState state; @action - void installed() => state = AuthenticationState.installed; + void installed() { + state = AuthenticationState._reset; + state = AuthenticationState.installed; + } @action - void allowed() => state = AuthenticationState.allowed; + void allowed() { + state = AuthenticationState._reset; + state = AuthenticationState.allowed; + } } diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 9eccf456..61282761 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -22,8 +22,8 @@ dependencies: barcode_scan2: ^4.2.1 http: ^0.13.4 path_provider: ^2.0.11 - mobx: 2.0.7+4 - flutter_mobx: ^2.0.6+1 + mobx: ^2.1.4 + flutter_mobx: ^2.0.6+5 flutter_slidable: ^2.0.0 share_plus: ^4.0.10 # date_range_picker: ^1.0.6 @@ -73,7 +73,7 @@ dev_dependencies: flutter_test: sdk: flutter build_runner: ^2.1.11 - mobx_codegen: ^2.0.7 + mobx_codegen: ^2.1.1 build_resolvers: ^2.0.9 hive_generator: ^1.1.3 flutter_launcher_icons: ^0.9.3