asJsonMap static method
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)),
);
}