parseException static method

dynamic parseException(
  1. PlatformException exception
)

Implementation

static parseException(PlatformException exception) {
  late LoginStatus status;

  switch (exception.code) {
    case "CANCELLED":
      status = LoginStatus.cancelled;
    default:
      status = LoginStatus.failed;
  }

  return LoginData(status: status, message: exception.message);
}