PopupMenuThemeData class

Defines the visual properties of the routes used to display popup menus as well as PopupMenuItem and PopupMenuDivider widgets.

Descendant widgets obtain the current PopupMenuThemeData object using PopupMenuTheme.of(context). Instances of PopupMenuThemeData can be customized with PopupMenuThemeData.copyWith.

Typically, a PopupMenuThemeData is specified as part of the overall Theme with ThemeData.popupMenuTheme. Otherwise, PopupMenuTheme can be used to configure its own widget subtree.

All PopupMenuThemeData properties are null by default. If any of these properties are null, the popup menu will provide its own defaults.

See also:

  • ThemeData, which describes the overall theme information for the application.
Mixed in types


PopupMenuThemeData({Color color, ShapeBorder shape, double elevation, TextStyle textStyle})
Creates the set of properties used to configure PopupMenuTheme.


color Color
The background color of the popup menu.
elevation double
The elevation of the popup menu.
hashCode int
The hash code for this object. [...]
read-only, override
shape ShapeBorder
The shape of the popup menu.
textStyle TextStyle
The text style of items in the popup menu.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


copyWith({Color color, ShapeBorder shape, double elevation, TextStyle textStyle}) PopupMenuThemeData
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
toString({DiagnosticLevel minLevel: DiagnosticLevel.info}) String
Returns a string representation of this object.
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.


operator ==(Object other) bool
The equality operator. [...]

Static Methods

lerp(PopupMenuThemeData a, PopupMenuThemeData b, double t) PopupMenuThemeData
Linearly interpolate between two popup menu themes. [...]