valueAsMap<T extends Map?> static method
Implementation
static T valueAsMap<T extends Map?>(Object? value) {
if (value is T) return value;
if (value == null && _isNull<T>()) return null as T;
if (!_isMap<T>()) {
if (_isMapStringDynamic<T>()) {
return valueEnsureAsMap<String, dynamic>(value) as T;
}
if (_isMapStringString<T>()) {
return valueEnsureAsMap<String, String>(value) as T;
}
}
throw JSONHelperException("Failed to parse value as map.");
}