TF-2810 Handle crashed when no browser available for OIDC

This commit is contained in:
Dat PHAM HOANG
2024-04-19 16:33:45 +07:00
committed by Dat H. Pham
parent 5a22ea0509
commit d2fdbfab0f
9 changed files with 286 additions and 19 deletions
@@ -1,4 +1,21 @@
import 'package:flutter/services.dart';
class NotFoundDataResourceRecordException implements Exception {}
class NotFoundUrlException implements Exception {}
class NotFoundUrlException implements Exception {}
class NoSuitableBrowserForOIDCException implements Exception {
static const noBrowserAvailableCode = 'no_browser_available';
static bool verifyException(dynamic exception) {
if (exception is PlatformException) {
if (exception.code == noBrowserAvailableCode) {
return true;
}
}
return false;
}
}