toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'title'] = title;
json[r'name'] = name;
if (image != null) {
json[r'image'] = image;
}
if (color != null) {
json[r'color'] = color;
}
if (role != null) {
json[r'role'] = role;
}
return json;
}