Skip to main content
The Stac Drawer allows you to build a Flutter Drawer widget using JSON. To know more about the Drawer widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
backgroundColorStacColorThe background color of the drawer.
elevationdoubleThe z-coordinate at which to place this drawer.
shadowColorStacColorThe color of the drawer’s shadow.
surfaceTintColorStacColorThe surface tint color of the drawer.
shapeStacShapeBorderThe shape of the drawer.
widthdoubleThe width of the drawer.
childStacWidgetThe widget below this widget in the tree.
semanticLabelStringThe semantic label for the drawer.
clipBehaviorStacClipThe clip behavior of the drawer.

Example

StacDrawer(
  backgroundColor: StacColors.white,
  elevation: 16.0,
  shadowColor: StacColors.black,
  surfaceTintColor: '#F2F2F2',
  shape: StacRoundedRectangleBorder(borderRadius: 16),
  width: 304.0,
  semanticLabel: 'Navigation Drawer',
  clipBehavior: StacClip.antiAlias,
  child: StacColumn(
    children: [
      StacText(data: 'Drawer Header'),
      StacText(data: 'Item 1'),
      StacText(data: 'Item 2'),
    ],
  ),
)