NativeException.fromCode constructor
NativeException.fromCode({
- required String code,
- required PlatformException platformException,
- required StackTrace stackTrace,
Implementation
factory NativeException.fromCode({
required String code,
required PlatformException platformException,
required StackTrace stackTrace,
}) {
final type = NativeExceptionType.values.firstWhere(
(type) => type.code == code,
orElse: () => NativeExceptionType.unexpected,
);
return NativeException(
type: type,
platformException: platformException,
stackTrace: stackTrace,
);
}