asList method
Convert Json to the JsonList or create JsonList from defaultValue
The jsonObject
must be Map<String, dynamic>, String or JsonList otherwise throw FormatException
Implementation
JsonList asList([List<dynamic>? defaultValue]) {
final jsonList = asListOr(defaultValue);
if (jsonList != null) {
return jsonList;
}
throw const FormatException("Json object is not list");
}