of static method
- BuildContext context
The closest instance of this class that encloses the given context.
If there is no enclosing DropdownMenuTheme widget, then ThemeData.dropdownMenuTheme is used.
Typical usage is as follows:
DropdownMenuThemeData theme = DropdownMenuTheme.of(context);
See also:
- maybeOf, which returns null if it doesn't find a DropdownMenuTheme ancestor.
Implementation
static DropdownMenuThemeData of(BuildContext context) {
return maybeOf(context) ?? Theme.of(context).dropdownMenuTheme;
}