M3EToolbarTheme class

Theme values for M3EToolbar.

Inheritance
Annotations

Constructors

M3EToolbarTheme({double containerSize = M3EToolbarTokens.containerSize, double floatingPadding = M3EToolbarTokens.floatingContentPadding, double dockedHorizontalPadding = M3EToolbarTokens.dockedHorizontalPadding, double actionGap = M3EToolbarTokens.containerBetweenSpace, double dockedPreferredGap = M3EToolbarTokens.dockedPreferredGap, double dockedMinGap = M3EToolbarTokens.containerBetweenSpace, double centeredGap = M3EToolbarTokens.centeredGap, double iconSize = 24, double elevation = M3EToolbarTokens.elevationNone, double floatingElevation = M3EToolbarTokens.floatingElevation, double elevationWithFab = M3EToolbarTokens.floatingElevation, double toolbarToFabGap = M3EToolbarTokens.toolbarToFabGap, double screenOffset = M3EToolbarTokens.screenOffset, double verticalScreenOffset = M3EToolbarTokens.verticalScreenOffset, double compactBreakpoint = M3EToolbarTokens.compactBreakpoint, double fabExpandedIcon = M3EToolbarTokens.fabExpandedIcon, double fabCollapsedIcon = M3EToolbarTokens.fabCollapsedIcon, double dockedRadius = M3EToolbarTokens.dockedRadius, double heightSmall = 40, double heightMedium = 48, double heightLarge = 56, double compactHeightReduction = 4, double elevationSurface = 0, double elevationProminent = 2, M3ESpring expandSpring = M3EMotion.expressiveSpatialFast, M3ESpring labelSpring = const M3ESpring(stiffness: 800, damping: 0.4)})
M3EToolbarTheme.
const

Properties

actionGap → double
Gap between floating actions.
final
centeredGap → double
Gap when M3EToolbarContentAlignment.centered is active.
final
compactBreakpoint → double
Window width below which docked actions stay evenly spaced.
final
compactHeightReduction → double
compactHeightReduction.
final
containerSize → double
containerSize.
final
dockedHorizontalPadding → double
dockedHorizontalPadding.
final
dockedMinGap → double
Smallest docked gap before actions overflow.
final
dockedPreferredGap → double
Preferred docked gap. Clamped down to dockedMinGap when the bar is tight.
final
dockedRadius → double
Docked corner radius. Default 0.
final
elevation → double
Docked elevation.
final
elevationProminent → double
elevationProminent.
final
elevationSurface → double
elevationSurface.
final
elevationWithFab → double
Kept for theme compatibility. Resolved metrics use floatingElevation.
final
expandSpring → M3ESpring
Floating toolbar morph / visibility expand spring.
final
fabCollapsedIcon → double
Collapsed FAB icon size.
final
fabExpandedIcon → double
Expanded FAB icon size.
final
floatingElevation → double
Floating elevation (level 3). Does not change when a FAB is attached.
final
floatingPadding → double
floatingPadding.
final
hashCode → int
The hash code for this object.
no setterinherited
heightLarge → double
heightLarge.
final
heightMedium → double
heightMedium.
final
heightSmall → double
heightSmall.
final
iconSize → double
iconSize.
final
labelSpring → M3ESpring
Labeled action expand / collapse spring.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenOffset → double
Horizontal floating screen margin.
final
toolbarToFabGap → double
toolbarToFabGap.
final
verticalScreenOffset → double
Vertical floating screen margin.
final

Methods

colors(M3EColorScheme scheme, M3EToolbarColorStyle style) → M3EToolbarColors
colors.
colorStyleFromVariant(M3EToolbarVariant variant) → M3EToolbarColorStyle
Maps legacy M3EToolbarVariant onto M3EToolbarColorStyle.
containerColor(M3EColorScheme scheme, M3EToolbarVariant variant) → Color
containerColor.
copyWith({double? containerSize, double? floatingPadding, double? dockedHorizontalPadding, double? actionGap, double? dockedPreferredGap, double? dockedMinGap, double? centeredGap, double? iconSize, double? elevation, double? floatingElevation, double? elevationWithFab, double? toolbarToFabGap, double? screenOffset, double? verticalScreenOffset, double? compactBreakpoint, double? fabExpandedIcon, double? fabCollapsedIcon, double? dockedRadius, double? heightSmall, double? heightMedium, double? heightLarge, double? compactHeightReduction, double? elevationSurface, double? elevationProminent, M3ESpring? expandSpring, M3ESpring? labelSpring}) → M3EToolbarTheme
Returns a copy with non-null fields replaced.
override
dockedShape() → ShapeBorder
dockedShape.
floatingShape() → ShapeBorder
floatingShape.
foregroundColor(M3EColorScheme scheme, M3EToolbarVariant variant) → Color
foregroundColor.
iconButtonSize(M3EToolbarSize size) → M3EIconButtonSize
iconButtonSize.
lerp(M3EToolbarTheme? other, double t) → M3EToolbarTheme
Linearly interpolates between this theme and other.
override
metrics(M3EToolbarDensity density, M3ESpacing spacing) → M3EToolbarMetrics
Legacy metrics API used by older call sites.
metricsFor(M3EToolbarPlacement placement) → M3EToolbarMetrics
metricsFor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scopedTheme(M3EThemeData base, Color foreground) → M3EThemeData
scopedTheme. Unselected toolbar icons read M3EColorScheme.onSurfaceVariant.
shape(M3EToolbarShapeFamily family) → ShapeBorder
shape.
subtitleStyle(M3ETypeScale typeScale) → TextStyle
subtitleStyle.
titleStyle(M3ETypeScale typeScale) → TextStyle
titleStyle.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

defaults → const M3EToolbarTheme
defaults.