toJson method
Implementation
Map<String, dynamic> toJson() {
final timerName = this.timerName;
final durationExpression = this.durationExpression;
final seconds = this.seconds;
return {
'timerName': timerName,
if (durationExpression != null) 'durationExpression': durationExpression,
if (seconds != null) 'seconds': seconds,
};
}