fromJson static method

PolarDataType fromJson(
  1. dynamic json
)

Create a PolarDataType from json

Implementation

static PolarDataType fromJson(dynamic json) {
  if (Platform.isIOS) {
    return PolarDataType.values[json as int];
  } else {
    // This is android
    return PolarDataType.values.byName((json as String).camelCase);
  }
}