defaultDateBuilder static method
The default date builder for FDateTimePicker.
Returns "Today" (localized) if date is today, otherwise returns the formatted date.
Implementation
static Widget defaultDateBuilder(BuildContext context, DateTime date, DateFormat format) {
final now = LocalDate.now();
if (date.year == now.year && date.month == now.month && date.day == now.day) {
return Text((FLocalizations.of(context) ?? FDefaultLocalizations()).dateTimePickerToday);
}
return Text(format.format(date));
}