asListString function
Returns a List for the value at key.
Throws a FormatException if the value is not a list of strings.
Implementation
List<String> asListString(dynamic json, String key,
{String Function(dynamic json)? fromJson}) {
return asListStringOrNull(json, key, fromJson: fromJson) ??
(throw FormatException('Invalid List<String> value for key: $key'));
}