M3EToolbar class
A Material 3 Expressive toolbar.
Mirrors Compose Material 3:
- M3EToolbar / M3EToolbar.floating →
HorizontalFloatingToolbar/VerticalFloatingToolbar - M3EToolbar.docked →
FlexibleBottomAppBar(docked toolbar tokens)
Floating toolbars own expand/collapse when an action sets M3EToolbarAction.isExpandTrigger. The pill grows left/right (or top/bottom) from that filled trigger with a spatial spring.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- M3EToolbar
- Implemented types
Constructors
-
M3EToolbar({Widget? leading, Widget? title, String? titleText, Widget? subtitle, String? subtitleText, Widget? trailing, List<
M3EToolbarItem> actions = const <M3EToolbarItem>[], int maxInlineActions = 4, Widget overflowIcon = const Icon(M3EIcons.more_vert), bool centerTitle = false, AlignmentGeometry alignment = Alignment.center, M3EToolbarColorStyle colorStyle = M3EToolbarColorStyle.standard, M3EToolbarVariant? variant, M3EToolbarSize size = M3EToolbarSize.medium, Axis axis = Axis.horizontal, bool expanded = true, ValueChanged<bool> ? onExpandedChanged, Widget? floatingActionButton, Widget? fabIcon, VoidCallback? onFabPressed, M3EToolbarFabPosition fabPosition = M3EToolbarFabPosition.end, M3EToolbarDockEdge dockEdge = M3EToolbarDockEdge.bottom, Color? backgroundColor, Color? foregroundColor, double? elevation, EdgeInsetsGeometry? padding, bool safeArea = false, Clip clipBehavior = Clip.none, String? semanticLabel, Key? key}) -
Floating toolbar (default). Horizontal unless
axisis vertical.const -
M3EToolbar.docked({Widget? leading, Widget? title, String? titleText, Widget? subtitle, String? subtitleText, Widget? trailing, List<
M3EToolbarItem> actions = const <M3EToolbarItem>[], int maxInlineActions = 4, Widget overflowIcon = const Icon(M3EIcons.more_vert), bool centerTitle = false, M3EToolbarColorStyle colorStyle = M3EToolbarColorStyle.standard, M3EToolbarVariant? variant, M3EToolbarSize size = M3EToolbarSize.medium, M3EToolbarDockEdge dockEdge = M3EToolbarDockEdge.bottom, Color? backgroundColor, Color? foregroundColor, double? elevation, EdgeInsetsGeometry? padding, bool safeArea = true, Clip clipBehavior = Clip.none, String? semanticLabel, Key? key}) -
Docked full-bleed bar (Compose
FlexibleBottomAppBar).const -
M3EToolbar.floating({Widget? leading, Widget? title, String? titleText, Widget? subtitle, String? subtitleText, Widget? trailing, List<
M3EToolbarItem> actions = const <M3EToolbarItem>[], int maxInlineActions = 4, Widget overflowIcon = const Icon(M3EIcons.more_vert), bool centerTitle = false, AlignmentGeometry alignment = Alignment.center, M3EToolbarColorStyle colorStyle = M3EToolbarColorStyle.standard, M3EToolbarVariant? variant, M3EToolbarSize size = M3EToolbarSize.medium, Axis axis = Axis.horizontal, bool expanded = true, ValueChanged<bool> ? onExpandedChanged, Widget? floatingActionButton, Widget? fabIcon, VoidCallback? onFabPressed, M3EToolbarFabPosition fabPosition = M3EToolbarFabPosition.end, M3EToolbarDockEdge dockEdge = M3EToolbarDockEdge.bottom, Color? backgroundColor, Color? foregroundColor, double? elevation, EdgeInsetsGeometry? padding, bool safeArea = false, Clip clipBehavior = Clip.none, String? semanticLabel, Key? key}) -
Explicit floating constructor (same as default).
const
Properties
-
actions
→ List<
M3EToolbarItem> -
actions.
final
- alignment → AlignmentGeometry
-
Positions a floating toolbar within its parent. Ignored when docked.
final
- axis → Axis
-
axis.
final
- backgroundColor → Color?
-
backgroundColor.
final
- centerTitle → bool
-
centerTitle.
final
- clipBehavior → Clip
-
clipBehavior.
final
- colorStyle → M3EToolbarColorStyle
-
colorStyle.
final
- dockEdge → M3EToolbarDockEdge
-
dockEdge.
final
- elevation → double?
-
elevation.
final
- expanded → bool
-
Initial expand state for floating toolbars that have an expand trigger.
final
- fabIcon → Widget?
-
fabIcon.
final
- fabPosition → M3EToolbarFabPosition
-
fabPosition.
final
- floatingActionButton → Widget?
-
floatingActionButton.
final
- foregroundColor → Color?
-
foregroundColor.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
leading.
final
- maxInlineActions → int
-
maxInlineActions.
final
-
onExpandedChanged
→ ValueChanged<
bool> ? -
Called whenever the owned expand state changes.
final
- onFabPressed → VoidCallback?
-
onFabPressed.
final
- overflowIcon → Widget
-
overflowIcon.
final
- padding → EdgeInsetsGeometry?
-
padding.
final
- placement → M3EToolbarPlacement
-
placement.
final
- preferredSize → Size
-
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeArea → bool
-
safeArea.
final
- semanticLabel → String?
-
semanticLabel.
final
- size → M3EToolbarSize
-
size.
final
- subtitle → Widget?
-
subtitle.
final
- subtitleText → String?
-
subtitleText.
final
- title → Widget?
-
title.
final
- titleText → String?
-
titleText.
final
- trailing → Widget?
-
trailing.
final
- variant → M3EToolbarVariant?
-
Legacy variant; when set, overrides colorStyle.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< M3EToolbar> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited