DrawerTheme class
Theme configuration for drawer and sheet overlays.
Defines visual properties for drawer and sheet components including surface effects, drag handles, and barrier appearance.
Features:
- Surface opacity and blur effects
- Customizable barrier colors
- Drag handle appearance control
- Consistent theming across drawer types
Example:
ComponentThemeData(
data: {
DrawerTheme: DrawerTheme(
surfaceOpacity: 0.9,
barrierColor: Colors.black54,
showDragHandle: true,
),
},
child: MyApp(),
)
Constructors
- DrawerTheme.new({double? surfaceOpacity, double? surfaceBlur, Color? barrierColor, bool? showDragHandle, Size? dragHandleSize})
-
Creates a DrawerTheme.
const
Properties
- barrierColor → Color?
-
Color of the barrier behind the drawer.
final
- dragHandleSize → Size?
-
Size of the drag handle when displayed.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDragHandle → bool?
-
Whether to display the drag handle for draggable drawers.
final
- surfaceBlur → double?
-
Surface blur intensity for backdrop effects.
final
- surfaceOpacity → double?
-
Surface opacity for backdrop effects.
final
Methods
-
copyWith(
{ValueGetter< double?> ? surfaceOpacity, ValueGetter<double?> ? surfaceBlur, ValueGetter<Color?> ? barrierColor, ValueGetter<bool?> ? showDragHandle, ValueGetter<Size?> ? dragHandleSize}) → DrawerTheme -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override