TrustPinException.fromPlatformException constructor
TrustPinException.fromPlatformException(
- dynamic error
Creates a TrustPinException from a platform exception.
This factory constructor is used internally to convert platform-specific exceptions into TrustPinException instances.
Implementation
factory TrustPinException.fromPlatformException(dynamic error) {
if (error is PlatformException) {
return TrustPinException(
error.code,
error.message ?? '',
error.details,
);
}
return TrustPinException('UNKNOWN_ERROR', error.toString());
}