parseDouble static method

double? parseDouble(
  1. dynamic json
)

Implementation

static double? parseDouble(dynamic json) {
  if (json is String) {
    return double.tryParse(json);
  } else if (json is int) {
    return json.toDouble();
  } else {
    return json;
  }
}