toJson method
Implementation
String toJson() {
switch (this) {
case IntervalUnit.minute:
return 'minute';
case IntervalUnit.hour:
return 'hour';
case IntervalUnit.day:
return 'day';
case IntervalUnit.month:
return 'month';
case IntervalUnit.year:
return 'year';
}
}