getRegistrationStateFromString static method

RegistrationState getRegistrationStateFromString(
  1. String? value
)

Implementation

static RegistrationState getRegistrationStateFromString(String? value) {
  switch (value) {
    case 'NOT_REGISTERED':
      return RegistrationState.notRegistered;
    case 'REGISTERING':
      return RegistrationState.registering;
    case 'OFFLINE':
      return RegistrationState.offline;
    case 'NO_CONNECTION':
      return RegistrationState.noConnection;
    case 'REGISTERED':
      return RegistrationState.registered;
    case 'ERROR':
      return RegistrationState.error;
    default:
      return RegistrationState.error;
  }
}