jsonDecodeAsMap<T extends Object> function
json
decoding.
Only maps are output. If it is not a map, null is output.
If Json cannot be converted, defaultValue
will be returned.
Implementation
Map<String, T> jsonDecodeAsMap<T extends Object>(String json,
[Map<String, T> defaultValue = const {}]) {
try {
return (jsonDecode(json) as Map<String, dynamic>).cast<String, T>();
// ignore: empty_catches
} catch (e) {}
return defaultValue;
}