getValue method
Implementation
dynamic getValue(
BuildContext context,
dynamic value,
int loop,
) {
switch (optionType) {
case FormatOptions.toInt:
return (this as ToIntFormatOption).toInt(value);
case FormatOptions.toDouble:
return (this as ToDoubleFormatOption).toDouble(value);
case FormatOptions.replaceAll:
return (this as ReplaceAllOption).replaceAll(value);
case FormatOptions.where:
return (this as WhereOption).where(
context,
value,
loop,
);
case FormatOptions.minutes:
return (this as PrintMinutesOption).printMinutes(value);
case FormatOptions.hours:
return (this as PrintHourOption).printHours(value);
case FormatOptions.day:
return (this as PrintDayOption).printDay(value);
case FormatOptions.month:
return (this as PrintMonthOption).printMonth(value);
case FormatOptions.year:
return (this as PrintYearOption).printYear(value);
case FormatOptions.listMax:
return (this as ListMaxOption).max(
value,
);
case FormatOptions.listMin:
return (this as ListMinOption).min(
value,
);
case FormatOptions.sortBy:
return (this as SortByOption).sortBy(
value,
);
default:
throw Exception(
'FormatOption.getValue, Unknown format option type, type: $optionType');
}
}