mapFromJson static method
Implementation
static Map<String, Role> mapFromJson(Map<String, dynamic>? json) {
if (json == null) {
return <String, Role>{};
}
return json.entries.fold(<String, Role>{},
(Map<String, Role> previousValue, element) {
final Role? object = Role.fromJson(element.value);
if (object is Role) {
previousValue[element.key] = object;
}
return previousValue;
});
}