of static method

DatePickerThemeData of(
  1. BuildContext context
)

The data from the closest instance of this class that encloses the given context.

If there is no DatePickerTheme in scope, this will return ThemeData.datePickerTheme from the ambient Theme.

Typical usage is as follows:

DatePickerThemeData theme = DatePickerTheme.of(context);

See also:

Implementation

static DatePickerThemeData of(BuildContext context) {
  return maybeOf(context) ?? Theme.of(context).datePickerTheme;
}