asJsonMap static method

Map<String, Object?>? asJsonMap(
  1. Object? value
)

Normalizes jsonDecode maps (Map<String, dynamic>) into Map<String, Object?>, including nested objects.

Implementation

static Map<String, Object?>? asJsonMap(Object? value) {
  if (value is! Map) {
    return null;
  }
  return value.map<String, Object?>(
    (key, nested) => MapEntry(key.toString(), _normalizeJsonValue(nested)),
  );
}