toJson method

dynamic toJson()

Convert a SampleType to json

Implementation

dynamic toJson() {
  if (Platform.isIOS) {
    return SampleType.values.indexOf(this);
  } else {
    // This is Android
    return name.toUpperCase();
  }
}