parseDouble static method

double? parseDouble(
  1. Object? source
)

Implementation

static double? parseDouble(Object? source) {
  if (source is num) return source.toDouble();
  if (source is! String) return null;
  if (source.contains('infinity')) return double.infinity;
  if (source.contains('nan')) return double.nan;
  return null;
}