ListStringOrBool.fromJson constructor
ListStringOrBool.fromJson(
- dynamic json
Implementation
factory ListStringOrBool.fromJson(dynamic json) {
if (json == null) throw Exception('Cannot parse null as ListStringOrBool');
if (json is List) {
return ListStringOrBool.fromListString(List<String>.from(json));
}
if (json is bool) return ListStringOrBool.fromBool(json);
throw Exception('Invalid type for ListStringOrBool: ${json.runtimeType}');
}