doubleOrNull method

double? doubleOrNull(
  1. String key
)

Implementation

double? doubleOrNull(String key) {
  final value = this[key];

  if (value is double) return value;
  if (value is num) return value.toDouble();

  return double.tryParse(value?.toString() ?? '');
}