6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 252c4432
Changed files
comwell_key_app/lib/authentication/authentication_repository.dart | 2 +- comwell_key_app/lib/utils/seos_repository.dart | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Diff
diff --git a/comwell_key_app/lib/authentication/authentication_repository.dart b/comwell_key_app/lib/authentication/authentication_repository.dart
index eac9a710..d0cfa02c 100644
--- a/comwell_key_app/lib/authentication/authentication_repository.dart
+++ b/comwell_key_app/lib/authentication/authentication_repository.dart
@@ -27,7 +27,7 @@ class AuthenticationRepository {
void _onAuthResult(AuthenticationStatus status) async {
try {
if (status == AuthenticationStatus.authenticated) {
- seos.startMobilePlugin();
+ await seos.startMobilePlugin();
}
} catch (e, st) {
if (kDebugMode) print("e=$e, $st");
diff --git a/comwell_key_app/lib/utils/seos_repository.dart b/comwell_key_app/lib/utils/seos_repository.dart
index abd528ac..32bdf00c 100644
--- a/comwell_key_app/lib/utils/seos_repository.dart
+++ b/comwell_key_app/lib/utils/seos_repository.dart
@@ -58,6 +58,7 @@ class SeosRepository {
}
Future<void> provisionKey({required String bookingId}) async {
+ if (!_pluginStarted) return;
try {
await api.provisionKey(bookingId);
await seosMobileKeysPlugin.updateEndpoint();
@@ -67,6 +68,7 @@ class SeosRepository {
}
Future<List<MobileKeysKey>> refreshKeys() async {
+ if (!_pluginStarted) return [];
try {
final List<MobileKeysKey> listOfKeys =
await seosMobileKeysPlugin.listMobileKeys();