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