toJson method
Implementation
Map<String, dynamic> toJson() {
final name = this.name;
final activities = this.activities;
final creationDate = this.creationDate;
final lastModifiedDate = this.lastModifiedDate;
final limits = this.limits;
final localTime = this.localTime;
final quietTime = this.quietTime;
final refreshFrequency = this.refreshFrequency;
final schedule = this.schedule;
final startActivity = this.startActivity;
final startCondition = this.startCondition;
final state = this.state;
return {
'Name': name,
if (activities != null) 'Activities': activities,
if (creationDate != null) 'CreationDate': creationDate,
if (lastModifiedDate != null) 'LastModifiedDate': lastModifiedDate,
if (limits != null) 'Limits': limits,
if (localTime != null) 'LocalTime': localTime,
if (quietTime != null) 'QuietTime': quietTime,
if (refreshFrequency != null) 'RefreshFrequency': refreshFrequency,
if (schedule != null) 'Schedule': schedule,
if (startActivity != null) 'StartActivity': startActivity,
if (startCondition != null) 'StartCondition': startCondition,
if (state != null) 'State': state.toValue(),
};
}