toJson method
Implementation
Map<String, dynamic> toJson() {
switch (optionType) {
case FormatOptions.toInt:
return (this as ToIntFormatOption).toJson();
case FormatOptions.toDouble:
return (this as ToDoubleFormatOption).toJson();
case FormatOptions.replaceAll:
return (this as ReplaceAllOption).toJson();
case FormatOptions.where:
return (this as WhereOption).toJson();
case FormatOptions.minutes:
return (this as PrintMinutesOption).toJson();
case FormatOptions.hours:
return (this as PrintHourOption).toJson();
case FormatOptions.day:
return (this as PrintDayOption).toJson();
case FormatOptions.month:
return (this as PrintMonthOption).toJson();
case FormatOptions.year:
return (this as PrintYearOption).toJson();
case FormatOptions.listMax:
return (this as ListMaxOption).toJson();
case FormatOptions.listMin:
return (this as ListMinOption).toJson();
case FormatOptions.sortBy:
return (this as SortByOption).toJson();
default:
throw Exception('Unknown format option type');
}
}