DrawerThemeData class
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, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, ShapeBorder? endShape, double? width, Clip? clipBehavior})
-
Creates a theme that can be used for ThemeData.drawerTheme and
DrawerTheme.
const
Properties
- backgroundColor → Color?
-
Overrides the default value of Drawer.backgroundColor.
final
- clipBehavior → Clip?
-
Overrides the default value of Drawer.clipBehavior.
final
- elevation → double?
-
Overrides the default value of Drawer.elevation.
final
- endShape → ShapeBorder?
-
Overrides the default value of Drawer.shape for a end drawer.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrimColor → Color?
-
Overrides the default value of DrawerController.scrimColor.
final
- shadowColor → Color?
-
Overrides the default value for Drawer.shadowColor.
final
- shape → ShapeBorder?
-
Overrides the default value of Drawer.shape.
final
- surfaceTintColor → Color?
-
Overrides the default value for Drawer.surfaceTintColor.
final
- width → double?
-
Overrides the default value of Drawer.width.
final
Methods
-
copyWith(
{Color? backgroundColor, Color? scrimColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, ShapeBorder? endShape, double? width, Clip? clipBehavior}) → 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 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(
DrawerThemeData? a, DrawerThemeData? b, double t) → DrawerThemeData? - Linearly interpolate between two drawer themes.