toMapOfStringDoubleN static method

Map<String, double>? toMapOfStringDoubleN(
  1. dynamic d
)

Converts to nullable map of <String, double> from dynamic

Implementation

static Map<String, double>? toMapOfStringDoubleN(dynamic d) {
  final jsonMap = Convert.toMapN<String, dynamic>(d);
  final Map<String, double> result = {};
  if (jsonMap != null) {
    jsonMap.forEach((key, value) {
      final d = Convert.toDoubleN(value);
      if (d != null) {
        result[key] = d;
      }
    });
  }
  return result;
}