listFromJson static method
Implementation
static List<Role> listFromJson(List<dynamic>? json) {
if (json == null) {
return <Role>[];
}
return json.fold(<Role>[], (List<Role> previousValue, element) {
final Role? object = Role.fromJson(element);
if (object is Role) {
previousValue.add(object);
}
return previousValue;
});
}