defaults static method
- BuildContext context
A DatePickerThemeData used as the default properties for date pickers.
This is only used for properties not already specified in the ambient DatePickerTheme.of.
See also:
- of, which will return ThemeData.datePickerTheme if it doesn't find a DatePickerTheme ancestor, instead of returning null.
- maybeOf, which returns null if it doesn't find a DatePickerTheme ancestor.
Implementation
static DatePickerThemeData defaults(BuildContext context) {
return Theme.of(context).useMaterial3
? _DatePickerDefaultsM3(context)
: _DatePickerDefaultsM2(context);
}