fromString static method

Provider fromString(
  1. String? value
)

Implementation

static Provider fromString(String? value) {
  if (value == null) return Provider.unknown;
  switch (value) {
    case 'fitbit':
      return Provider.fitbit;
    case 'dexcom':
      return Provider.dexcom;
    case 'oura':
      return Provider.oura;
    case 'suunto':
      return Provider.suunto;
    case 'garmin':
      return Provider.garmin;
    case 'strava':
      return Provider.strava;
    case 'polar':
      return Provider.polar;
    case 'whoop':
      return Provider.whoop;
    case 'withings':
      return Provider.withings;
    case 'wahoo':
      return Provider.wahoo;
    case 'apple':
      return Provider.apple;
    case 'health_connect':
      return Provider.healthConnect;
    case 'ultrahuman':
      return Provider.ultrahuman;
    case 'samsung_health_data':
      return Provider.samsungHealthData;
    case 'huawei':
      return Provider.huawei;
    case 'freestyle_libre':
      return Provider.freestyleLibre;
    case 'coros':
      return Provider.coros;
    case '_unknown':
      return Provider.unknown;
    default:
      return Provider.unknown;
  }
}