TF-2810 Handle crashed when no browser available for OIDC
This commit is contained in:
committed by
Dat H. Pham
parent
5a22ea0509
commit
d2fdbfab0f
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user