of static method

Retrieves the DropdownMenuThemeData from the closest ancestor DropdownMenuTheme.

If there is no enclosing DropdownMenuTheme widget, then ThemeData.dropdownMenuTheme is used.

Typical usage is as follows:

DropdownMenuThemeData theme = DropdownMenuTheme.of(context);

See also:

Implementation

static DropdownMenuThemeData of(BuildContext context) {
  return maybeOf(context) ?? Theme.of(context).dropdownMenuTheme;
}