StacDrawer class
A Stac model representing Flutter's Drawer
widget.
A Material Design panel that slides in horizontally from the edge of a
Scaffold
to show navigation links in an application.
{@tool snippet} Dart Example:
StacDrawer(
backgroundColor: StacColors.white,
elevation: 16,
shadowColor: StacColors.black54,
surfaceTintColor: StacColors.transparent,
width: 304,
clipBehavior: Clip.hardEdge,
shape: StacShapeBorder.rectangle(
borderRadius: StacBorderRadius.all(8),
),
child: StacColumn(children: [/* ... */]),
)
{@end-tool}
{@tool snippet} JSON Example:
{
"type": "drawer",
"backgroundColor": "#FFFFFF",
"elevation": 16,
"shadowColor": "#88000000",
"surfaceTintColor": "transparent",
"width": 304,
"clipBehavior": "hardEdge",
"shape": {
"type": "rectangle",
"borderRadius": { "type": "all", "radius": 8 }
},
"child": { "type": "column", "children": [] }
}
{@end-tool}
See also:
- Flutter's Drawer documentation (
https://api.flutter.dev/flutter/material/Drawer-class.html
)
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacDrawer
- Annotations
-
- @JsonSerializable()
Constructors
- StacDrawer.new({StacColor? backgroundColor, double? elevation, StacColor? shadowColor, StacColor? surfaceTintColor, StacShapeBorder? shape, double? width, StacWidget? child, String? semanticLabel, StacClip? clipBehavior})
-
Creates a StacDrawer.
const
-
StacDrawer.fromJson(Map<
String, dynamic> json) -
Creates a StacDrawer from a JSON map.
factory
Properties
- backgroundColor → StacColor?
-
Background color of the drawer.
final
- child → StacWidget?
-
The primary content of the drawer.
final
- clipBehavior → StacClip?
-
The clip behavior for the drawer's content.
final
- elevation → double?
-
Elevation of the drawer in logical pixels.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
A semantic label for the drawer.
final
- shadowColor → StacColor?
-
Color of the drawer's shadow.
final
- shape → StacShapeBorder?
-
The shape of the drawer.
final
- surfaceTintColor → StacColor?
-
Surface tint color applied on top of the drawer surface.
final
- type → String
-
Widget type identifier for this model.
no setteroverride
- width → double?
-
The width of the drawer.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this StacDrawer to a JSON map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited