core.Map<core.String, core.dynamic> toJson() => { if (color != null) 'color': color!, if (type != null) 'type': type!, };