NavigationDrawerThemeData class

Defines default property values for descendant NavigationDrawer widgets.

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

Typically a NavigationDrawerThemeData is specified as part of the overall Theme with ThemeData.navigationDrawerTheme. Alternatively, a NavigationDrawerTheme inherited widget can be used to theme NavigationDrawers in a subtree of widgets.

All NavigationDrawerThemeData properties are null by default. When null, the NavigationDrawer will provide its own defaults based on the overall Theme's textTheme and colorScheme. See the individual NavigationDrawer properties for details.

See also:

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

Constructors

Creates a theme that can be used for ThemeData.navigationDrawerTheme and NavigationDrawerTheme.
const

Properties

backgroundColor Color?
Overrides the default value of NavigationDrawer.backgroundColor.
final
elevation double?
Overrides the default value of NavigationDrawer.elevation.
final
hashCode int
The hash code for this object.
no setteroverride
iconTheme MaterialStateProperty<IconThemeData?>?
The theme to merge with the default icon theme for NavigationDestination icons.
final
indicatorColor Color?
Overrides the default value of NavigationDrawer's selection indicator.
final
indicatorShape ShapeBorder?
Overrides the default shape of the NavigationDrawer's selection indicator.
final
indicatorSize Size?
Overrides the default size of the NavigationDrawer's selection indicator.
final
labelTextStyle MaterialStateProperty<TextStyle?>?
The style to merge with the default text style for NavigationDestination labels.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
Overrides the default value of NavigationDrawer.shadowColor.
final
surfaceTintColor Color?
Overrides the default value of NavigationDrawer.surfaceTintColor.
final
tileHeight double?
Overrides the default height of NavigationDrawerDestination.
final

Methods

copyWith({double? tileHeight, Color? backgroundColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, Color? indicatorColor, ShapeBorder? indicatorShape, Size? indicatorSize, MaterialStateProperty<TextStyle?>? labelTextStyle, MaterialStateProperty<IconThemeData?>? iconTheme}) NavigationDrawerThemeData
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.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(NavigationDrawerThemeData? a, NavigationDrawerThemeData? b, double t) NavigationDrawerThemeData?
Linearly interpolate between two navigation rail themes.