Map<String, dynamic> toJson() { return <String, dynamic>{ if (hours != null) r'hours': hours, if (minutes != null) r'minutes': minutes, if (seconds != null) r'seconds': seconds, }; }