AuthenticationException.fromPlatformException constructor

AuthenticationException.fromPlatformException(
  1. PlatformException exception
)

Creates an exception from the error reported by the platform.

Implementation

factory AuthenticationException.fromPlatformException(
  PlatformException exception,
) {
  return AuthenticationException(
    reason: _reasonOf(exception),
    code: exception.code,
    message: exception.message,
    details: exception.details,
    stacktrace: exception.stacktrace,
  );
}