DrawerThemeData class Null safety
Defines default property values for descendant Drawer widgets.
Descendant widgets obtain the current DrawerThemeData object
using DrawerTheme.of(context)
. Instances of DrawerThemeData can be
customized with DrawerThemeData.copyWith.
Typically a DrawerThemeData is specified as part of the overall Theme with ThemeData.drawerTheme.
All DrawerThemeData properties are null
by default.
See also:
- DrawerTheme, an InheritedWidget that propagates the theme down its subtree.
- ThemeData, which describes the overall theme information for the application and can customize a drawer using ThemeData.drawerTheme.
- Mixed in types
- Annotations
Constructors
- DrawerThemeData({Color? backgroundColor, Color? scrimColor, double? elevation, ShapeBorder? shape, double? width})
-
Creates a theme that can be used for ThemeData.drawerTheme and
DrawerTheme.
const
Properties
- backgroundColor → Color?
-
Overrides the default value of Drawer.backgroundColor.
final
- elevation → double?
-
Overrides the default value of Drawer.elevation.
final
- hashCode → int
-
The hash code for this object.
read-onlyoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- scrimColor → Color?
-
Overrides the default value of DrawerController.scrimColor.
final
- shape → ShapeBorder?
-
Overrides the default value of Drawer.shape.
final
- width → double?
-
Overrides the default value of Drawer.width.
final
Methods
-
copyWith(
{Color? backgroundColor, Color? scrimColor, double? elevation, ShapeBorder? shape, double? width}) → DrawerThemeData - 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 non-existent 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(
DrawerThemeData? a, DrawerThemeData? b, double t) → DrawerThemeData? - Linearly interpolate between two drawer themes.