Skip to content

Navigation & Scaffold

MiuixScaffold

Miuix-style scaffold that arranges the top bar, bottom bar, floating action button, floating toolbar, snackbar, and popup layers; content receives the padding computed by the scaffold and applies it itself.

ParameterTypeDefaultDescription
keyKey?Widget key
topBarWidget?nullTop app bar, usually a MiuixTopAppBar
bottomBarWidget?nullBottom bar, usually a MiuixNavigationBar
floatingActionButtonWidget?nullFloating action button
floatingActionButtonPositionMiuixFabPositionMiuixFabPosition.endPosition of the FAB
floatingToolbarWidget?nullFloating toolbar
floatingToolbarPositionMiuixToolbarPositionMiuixToolbarPosition.bottomCenterPosition of the floating toolbar
snackbarHostWidget?nullHost for snackbars, usually a MiuixSnackbarHost
popupHostWidget?nullHost for popups and dialogs; defaults to MiuixPopupHost when null
containerColorColor?nullBackground color, defaults to MiuixTheme.colors.surface; pass transparent for none
contentWindowInsetsEdgeInsets?nullWindow insets passed to content; falls back to MediaQuery.paddingOf(context)
contentMiuixScaffoldContentBuilderrequiredMain body; the lambda receives the padding to apply at the content root

Example:

dart
MiuixScaffold(
  topBar: MiuixSmallTopAppBar(title: 'Home'),
  bottomBar: MiuixNavigationBar(children: [/* ... */]),
  content: (padding) => Padding(padding: padding, child: bodyList),
)

MiuixScaffoldContentBuilder

Type alias for the MiuixScaffold.content slot. The scaffold first measures the top/bottom bars and system insets, then passes the EdgeInsets to be applied at the content root via this callback; the content should wrap its root with Padding itself.

Signature:

dart
typedef MiuixScaffoldContentBuilder = Widget Function(EdgeInsets contentPadding);
ParameterTypeDescription
contentPaddingEdgeInsetsPadding computed by the scaffold, to be applied at the content root

MiuixFabPosition

Position of the floating action button (FAB) within MiuixScaffold.

ValueDescription
startBottom start, above the bottom bar (if any)
centerBottom center, above the bottom bar (if any)
endBottom end, above the bottom bar (if any)
endOverlayBottom end, overlaid on top of the bottom bar (if any)

MiuixToolbarPosition

Position of the floating toolbar within MiuixScaffold. Enum order is TopStart=0 ... BottomCenter=7.

ValueDescription
topStartTop start
centerStartCenter start
bottomStartBottom start
topEndTop end
centerEndCenter end
bottomEndBottom end
topCenterTop center
bottomCenterBottom center

MiuixTopAppBar

Collapsible large-title top app bar. Requires a MiuixScrollBehavior to collapse/expand; without scrollBehavior it stays statically expanded.

ParameterTypeDefaultDescription
keyKey?Widget key
titleStringrequiredTitle text
colorColor?nullBackground color, defaults to MiuixTheme.colors.surface
titleColorColor?nullCollapsed small-title color
largeTitleString?nullLarge title, defaults to title
largeTitleColorColor?nullLarge-title color
subtitleString''Subtitle (shown below the large title when expanded, below the small title when collapsed)
subtitleColorColor?nullSubtitle color
navigationIconWidget?nullNavigation (leading) icon
actionsList<Widget>?nullAction (trailing) icons
scrollBehaviorMiuixScrollBehavior?nullScroll behavior controlling collapse/expand
defaultWindowInsetsPaddingbooltrueWhether to apply default window insets padding
titlePaddingdoubleMiuixTopAppBarDefaults.titlePadding (26)Title horizontal padding
navigationIconPaddingdoubleMiuixTopAppBarDefaults.navigationIconPadding (16)Navigation icon start padding
actionIconPaddingdoubleMiuixTopAppBarDefaults.actionIconPadding (16)Action icon end padding
bottomContentWidget?nullExtra content below the title area
blurredboolfalseEnable frosted-glass background (enhancement, not in the original). When true, the background becomes a real-time Gaussian blur of the already-painted content behind it plus a translucent tint ("content blurs through the bar"). Implemented with BackdropFilter; requires the bar to paint above the scrollable content (MiuixScaffold's topBar does).
blurRadiusdouble24Frosted-glass blur radius (dp), only when blurred=true; sigma = blurRadius × 0.45
blurTintAlphadouble0.55Opacity [0,1] of the background tint over the blur, only when blurred=true. Too high hides the blur, too low lacks contrast

Example:

dart
final behavior = miuixScrollBehavior();
MiuixTopAppBar(
  title: 'Title',
  subtitle: 'Subtitle',
  scrollBehavior: behavior,
  navigationIcon: MiuixIcon(vector: MiuixIcons.basic.back),
);

// Frosted-glass bar (content blurs through)
MiuixScaffold(
  topBar: const MiuixTopAppBar(title: 'Home', blurred: true),
  content: (padding) => ListView(padding: padding, children: [/* ... */]),
);

MiuixSmallTopAppBar

Static small-title top app bar. Does not collapse/expand and shows a centered title; if a scrollBehavior is passed, it locks the state's heightOffsetLimit to 0 (pinned effect).

ParameterTypeDefaultDescription
keyKey?Widget key
titleStringrequiredTitle text
colorColor?nullBackground color, defaults to MiuixTheme.colors.surface
titleColorColor?nullTitle color
subtitleString''Subtitle (centered below the title)
subtitleColorColor?nullSubtitle color
navigationIconWidget?nullNavigation (leading) icon
actionsList<Widget>?nullAction (trailing) icons
scrollBehaviorMiuixScrollBehavior?nullWhen set, locks the shared behavior to pinned
defaultWindowInsetsPaddingbooltrueWhether to apply default window insets padding
titlePaddingdoubleMiuixTopAppBarDefaults.titlePadding (26)Title horizontal padding
navigationIconPaddingdoubleMiuixTopAppBarDefaults.navigationIconPadding (16)Navigation icon start padding
actionIconPaddingdoubleMiuixTopAppBarDefaults.actionIconPadding (16)Action icon end padding
bottomContentWidget?nullExtra content below the title area

Example:

dart
MiuixSmallTopAppBar(title: 'Settings', subtitle: 'v1.0')

MiuixTopAppBarState

State for the top app bar (extends ChangeNotifier). Holds the collapse offset, content scroll offset, etc.; usually held and updated by a MiuixScrollBehavior and read by MiuixTopAppBar.

ParameterTypeDefaultDescription
initialHeightOffsetLimitdoubledouble.negativeInfinityCollapse height limit (negative; max collapsible pixels)
initialHeightOffsetdouble0Initial collapse offset
initialContentOffsetdouble0Initial content scroll offset

Key properties: heightOffsetLimit, heightOffset (clamped between the limit and 0), contentOffset, collapsedFraction (0 expanded, 1 collapsed), overlappedFraction.

MiuixScrollBehavior

Scroll behavior abstraction. Exposes state (MiuixTopAppBarState) and isPinned (whether it is fixed and does not collapse on scroll).

MiuixExitUntilCollapsedScrollBehavior

"Exit until collapsed" scroll behavior. Scrolling up collapses the top app bar first, then scrolls the content below; scrolling down expands the top app bar first. Implements MiuixScrollBehavior; isPinned is always false.

ParameterTypeDefaultDescription
stateMiuixTopAppBarState?new MiuixTopAppBarState() if omittedAssociated state
canScrollbool Function()?nullWhether to handle scroll events

MiuixScrollBehaviorListener

Listener bridging scroll events to a MiuixExitUntilCollapsedScrollBehavior; wrap any scrollable to automatically handle collapse/expand and the snap animation after a gesture ends.

ParameterTypeDefaultDescription
keyKey?Widget key
behaviorMiuixExitUntilCollapsedScrollBehaviorrequiredScroll behavior
childWidgetrequiredThe wrapped scrollable child

Example:

dart
final behavior = miuixScrollBehavior();
MiuixScrollBehaviorListener(
  behavior: behavior,
  child: ListView(children: [/* ... */]),
);

miuixScrollBehavior

Top-level function that creates a default MiuixExitUntilCollapsedScrollBehavior.

ParameterTypeDefaultDescription
stateMiuixTopAppBarState?nullAssociated state
canScrollbool Function()?nullWhether to handle scroll events

Returns: MiuixExitUntilCollapsedScrollBehavior

MiuixTopAppBarDefaults

Top app bar defaults (private constructor, static constants only).

ConstantValueDescription
titlePadding26Title horizontal padding
navigationIconPadding16Navigation icon start padding
actionIconPadding16Action icon end padding
collapsedHeight52Collapsed top app bar height
smallTopAppBarCenterHeight50SmallTopAppBar vertical center height
largeTitleBottomPadding4Large-title bottom padding when no subtitle
subtitleBottomPadding8Subtitle bottom padding
titleWidthFraction0.9Horizontal margin ratio between centered title and nav/actions

MiuixNavigationBar

Standard bottom navigation bar. children is usually 2 to 5 MiuixNavigationBarItem widgets (asserts length 2..5), each Expanded evenly.

ParameterTypeDefaultDescription
keyKey?Widget key
childrenList<Widget>requiredNavigation items (length must be 2..5)
colorColor?nullBackground color; falls back to colors.background
colorsMiuixNavigationBarColors?nullColor config; falls back to theme defaults
showDividerbooltrueWhether to show the top divider
defaultWindowInsetsPaddingbooltrueWhether to add bottom system-inset padding
modeMiuixNavigationBarDisplayModeMiuixNavigationBarDisplayMode.iconAndTextItem display mode

Example:

dart
MiuixNavigationBar(
  children: [
    MiuixNavigationBarItem(selected: index == 0, onPressed: () {}, icon: icon0, label: 'Home'),
    MiuixNavigationBarItem(selected: index == 1, onPressed: () {}, icon: icon1, label: 'Me'),
  ],
)

MiuixNavigationBarItem

Standard navigation item. icon and labelWidget are slots; when labelWidget is omitted, text is built from label.

ParameterTypeDefaultDescription
keyKey?Widget key
selectedboolrequiredWhether selected
onPressedVoidCallback?requiredTap callback; disabled when null
iconWidgetrequiredIcon slot
labelStringrequiredAccessibility label and default visible text
labelWidgetWidget?nullCustom label widget
enabledbooltrueWhether enabled
badgeWidget?nullBadge slot, anchored at the top-end of the icon

MiuixFloatingNavigationBar

Floating bottom navigation bar. Items lay out at their own width (not evenly divided) with a fixed 12 spacing (asserts children length 2..5).

ParameterTypeDefaultDescription
keyKey?Widget key
childrenList<Widget>requiredNavigation items (length must be 2..5)
colorColor?nullBackground color; falls back to colors.floatingBackground
colorsMiuixNavigationBarColors?nullColor config; falls back to theme defaults
cornerRadiusdoubleMiuixFloatingNavigationBarDefaults.cornerRadius (50)Corner radius
horizontalAlignmentAlignmentGeometryAlignmentDirectional.centerHorizontal alignment
horizontalOutSidePaddingdoubleMiuixFloatingNavigationBarDefaults.horizontalOutSidePadding (36)Outer horizontal padding
shadowElevationdoubleMiuixFloatingNavigationBarDefaults.shadowElevation (1)Whether to show shadow (>0 shows; shadow fixed to black 20%, blurRadius=10)
showDividerboolfalseWhether to show an outline
defaultWindowInsetsPaddingbooltrueWhether to apply default caption-bar inset (0 on mobile)

Example:

dart
MiuixFloatingNavigationBar(
  children: [
    MiuixFloatingNavigationBarItem(selected: true, onPressed: () {}, icon: icon0, label: 'Home'),
    MiuixFloatingNavigationBarItem(selected: false, onPressed: () {}, icon: icon1, label: 'Me'),
  ],
)

MiuixFloatingNavigationBarItem

Floating navigation item.

ParameterTypeDefaultDescription
keyKey?Widget key
selectedboolrequiredWhether selected
onPressedVoidCallback?requiredTap callback; disabled when null
iconWidgetrequiredIcon slot
labelStringrequiredAccessibility label
enabledbooltrueWhether enabled
badgeWidget?nullBadge slot

MiuixNavigationItem

Navigation item data (@immutable).

ParameterTypeDefaultDescription
labelStringrequiredAccessibility label and default visible label text
iconWidgetrequiredIcon slot; the component provides size and state color via IconTheme
badgeWidget?nullOptional badge slot, anchored at the top-end of the icon

MiuixNavigationBarDisplayMode

Item display mode.

ValueDescription
iconAndTextAlways show icon and text
iconOnlyShow icon only
iconWithSelectedLabelAlways show icon, show text only for the selected item

MiuixNavigationBarColors

Navigation bar colors, holding theme colors for both standard and floating bars (@immutable).

ParameterTypeDefaultDescription
backgroundColorrequiredStandard bar background color
floatingBackgroundColorrequiredFloating bar background color
contentColorrequiredBase color for icons and labels; state alpha is computed on top
dividerColorrequiredDivider and floating-outline color

MiuixNavigationBarDefaults

Standard navigation bar defaults (private constructor).

ConstantValueDescription
itemHeight64Item height
iconSize26Icon size
labelFontSize12Label font size
iconTopPadding8Icon top padding
bottomPadding8Bottom padding
selectedPressedAlpha0.5Selected + pressed alpha
unselectedPressedAlpha0.6Unselected + pressed alpha
unselectedAlpha0.4Unselected alpha
selectionAnimationDuration300msSelection animation duration

Static method defaultColors(BuildContext) → MiuixNavigationBarColors: builds default colors from the current theme.

MiuixFloatingNavigationBarDefaults

Floating navigation bar defaults (private constructor).

ConstantValueDescription
horizontalOutSidePadding36Outer horizontal padding
shadowElevation1Shadow toggle
horizontalPadding12Inner horizontal padding
itemSpacing12Item spacing
iconSize28Icon size
iconPadding10Icon padding
selectedPressedAlpha0.5Selected + pressed alpha
unselectedPressedAlpha0.6Unselected + pressed alpha
unselectedAlpha0.4Unselected alpha
cornerRadius50Corner radius, matches FloatingToolbarDefaults.CornerRadius

Static method defaultColors(BuildContext) → MiuixNavigationBarColors: delegates to MiuixNavigationBarDefaults.defaultColors.

MiuixNavigationRail

Miuix navigation rail for wide screens with an optional expand controller. When state is null it uses the classic collapsed layout without a toggle button; when non-null, the rail width, item layout, selected background, and font size share one spring animation.

ParameterTypeDefaultDescription
keyKey?Widget key
childrenList<Widget>requiredNavigation items, usually MiuixNavigationRailItem
stateMiuixNavigationRailState?nullExpand/collapse state; no toggle button when null
headerWidget?nullHeader content at the top
colorsMiuixNavigationRailColors?nullColor config; falls back to theme defaults
showDividerbooltrueWhether to show the trailing divider
defaultWindowInsetsPaddingbooltrueWhether to apply default window insets padding
minWidthdoubleMiuixNavigationRailDefaults.minWidth (80)Collapsed width
expandedWidthdoubleMiuixNavigationRailDefaults.expandedWidth (240)Expanded width
expandContentDescriptionStringMiuixNavigationRailDefaults.expandContentDescription ('Expand navigation rail')A11y description for expand button
collapseContentDescriptionStringMiuixNavigationRailDefaults.collapseContentDescription ('Collapse navigation rail')A11y description for collapse button
scrollControllerScrollController?nullInternal scroll controller
iconSizedoubleMiuixNavigationRailDefaults.iconSize (28)Item icon size; reducing it also lowers item height (both collapsed and expanded)
itemVerticalPaddingdoubleMiuixNavigationRailDefaults.itemVerticalPadding (12)Collapsed-state item vertical padding
expandedItemVerticalPaddingdoubleMiuixNavigationRailDefaults.expandedItemContentVerticalPadding (14)Expanded-state item vertical padding; reducing it directly lowers expanded item height
labelFontSizedoubleMiuixNavigationRailDefaults.labelFontSize (12)Collapsed-state label font size
expandedLabelFontSizedoubleMiuixNavigationRailDefaults.expandedLabelFontSize (16)Expanded-state label font size

The last 5 size parameters are enhancements; their defaults preserve the original values (non-breaking), for optionally compacting rail items.

Example:

dart
final railState = MiuixNavigationRailState();
MiuixNavigationRail(
  state: railState,
  children: [
    MiuixNavigationRailItem(selected: true, onPressed: () {}, icon: icon0, label: 'Home'),
    MiuixNavigationRailItem(selected: false, onPressed: () {}, icon: icon1, label: 'Settings'),
  ],
)

MiuixNavigationRailItem

Navigation rail item supporting icon, label, and an optional badge slot. The icon is decorative; the item semantics only announce label.

ParameterTypeDefaultDescription
keyKey?Widget key
selectedboolrequiredWhether selected
onPressedVoidCallback?requiredTap callback; disabled when null
iconWidgetrequiredIcon slot
labelStringrequiredLabel text (announced for a11y)
enabledbooltrueWhether enabled
badgeWidget?nullBadge slot, anchored at the top-end of the icon

MiuixNavigationRailState

State object controlling expand/collapse of MiuixNavigationRail (extends ChangeNotifier). Aliased as MiuixNavigationRailController.

ParameterTypeDefaultDescription
initialValueMiuixNavigationRailValueMiuixNavigationRailValue.collapsedInitial expand state

Key members: currentValue, isExpanded, expand(), collapse(), toggle().

MiuixNavigationRailController

Type alias for MiuixNavigationRailState (typedef MiuixNavigationRailController = MiuixNavigationRailState).

MiuixNavigationRailValue

Expand state enum for the navigation rail.

ValueDescription
collapsedCollapsed
expandedExpanded

MiuixNavigationRailColors

Navigation rail color config (@immutable).

ParameterTypeDefaultDescription
backgroundColorrequiredBackground color
contentColorrequiredContent (icon/label) color
indicatorColorrequiredSelected indicator color
dividerColorrequiredDivider color

MiuixNavigationRailDefaults

NavigationRail defaults (private constructor).

ConstantValueDescription
minWidth80Collapsed width
expandedWidth240Expanded width
verticalPadding24Vertical padding
headerSpacing24Header spacing
iconSize28Icon size
iconTextSpacing4Icon-to-text spacing
itemVerticalPadding12Item vertical padding
labelFontSize12Collapsed label font size
expandedLabelFontSize16Expanded label font size
expandedItemHorizontalMargin12Expanded item horizontal margin
expandedItemCornerRadius16Expanded item corner radius
collapsedIndicatorVerticalPadding4Collapsed indicator vertical padding
expandedItemContentHorizontalPadding14Expanded item content horizontal padding
expandedItemContentVerticalPadding14Expanded item content vertical padding
expandedItemIconTextSpacing16Expanded item icon-to-text spacing
expandContentDescription'Expand navigation rail'Expand description
collapseContentDescription'Collapse navigation rail'Collapse description

Static method colors(BuildContext) → MiuixNavigationRailColors: builds default colors from the current theme.

MiuixTabRow

Miuix tab row. Horizontally scrollable, with the selected tab indicated by a squircle background.

ParameterTypeDefaultDescription
keyKey?Widget key
tabsList<String>requiredTab text labels
selectedTabIndexintrequiredSelected tab index
onTabSelectedValueChanged<int>requiredSelection callback
colorsMiuixTabRowColors?nullColor config; falls back to theme defaults
minWidthdoubleMiuixTabRowDefaults.tabRowMinWidth (76)Min width per tab
maxWidthdoubleMiuixTabRowDefaults.tabRowMaxWidth (98)Max width per tab
heightdoubleMiuixTabRowDefaults.tabRowHeight (42)Tab row height
cornerRadiusdoubleMiuixTabRowDefaults.tabRowCornerRadius (12)Indicator corner radius
itemSpacingdoubleMiuixTabRowDefaults.tabRowItemSpacing (9)Item spacing
contentAlignmentAlignmentGeometryAlignment.centerTab content alignment
scrollControllerScrollController?nullHorizontal scroll controller

Example:

dart
MiuixTabRow(
  tabs: ['All', 'Unread', 'Archived'],
  selectedTabIndex: index,
  onTabSelected: (i) => setState(() => index = i),
)

MiuixTabRowWithContour

Tab row with an outer contour. Wraps the whole row in a squircle frame; the indicator has a 200ms move animation.

ParameterTypeDefaultDescription
keyKey?Widget key
tabsList<String>requiredTab text labels
selectedTabIndexintrequiredSelected tab index
onTabSelectedValueChanged<int>requiredSelection callback
colorsMiuixTabRowColors?nullColor config; falls back to theme defaults
minWidthdoubleMiuixTabRowDefaults.tabRowWithContourMinWidth (62)Min width per tab
maxWidthdoubleMiuixTabRowDefaults.tabRowWithContourMaxWidth (84)Max width per tab
heightdoubleMiuixTabRowDefaults.tabRowWithContourHeight (45)Tab row height
cornerRadiusdoubleMiuixTabRowDefaults.tabRowWithContourCornerRadius (8)Indicator corner radius
itemSpacingdoubleMiuixTabRowDefaults.contourItemSpacing (5)Item spacing
contentAlignmentAlignmentGeometryAlignment.centerTab content alignment
scrollControllerScrollController?nullHorizontal scroll controller

Example:

dart
MiuixTabRowWithContour(
  tabs: ['Day', 'Week', 'Month'],
  selectedTabIndex: index,
  onTabSelected: (i) => setState(() => index = i),
)

MiuixTabRowColors

Tab row color config (@immutable). Provides background(bool) and content(bool) helpers.

ParameterTypeDefaultDescription
backgroundColorColorrequiredUnselected background color
contentColorColorrequiredUnselected content color
selectedBackgroundColorColorrequiredSelected background color
selectedContentColorColorrequiredSelected content color

MiuixTabRowDefaults

Tab row defaults (private constructor).

ConstantValueDescription
tabRowHeight42TabRow height
tabRowWithContourHeight45Contour variant height
tabRowCornerRadius12TabRow corner radius
tabRowWithContourCornerRadius8Contour variant corner radius
tabRowMinWidth76TabRow min tab width
tabRowWithContourMinWidth62Contour variant min tab width
tabRowMaxWidth98TabRow max tab width
tabRowWithContourMaxWidth84Contour variant max tab width
tabRowItemSpacing9TabRow item spacing
contourItemSpacing5Contour variant item spacing
contourPadding5Contour variant padding
itemHorizontalPadding12Tab horizontal padding
borderWidth1Border width

Static method defaultColors(BuildContext) → MiuixTabRowColors: builds default colors from the current theme.

MiuixBreadcrumbBar

Horizontal breadcrumb bar. Scrolls horizontally when content overflows; a negative highlightIndex disables both highlighting and auto-centering.

ParameterTypeDefaultDescription
keyKey?Widget key
itemsList<MiuixBreadcrumbItem>requiredBreadcrumb segments
onItemClickValueChanged<int>requiredCallback when a segment is tapped
highlightIndexint?nullHighlight index; null means the last item, negative disables highlight
enabledbooltrueWhether enabled
colorsMiuixBreadcrumbBarColors?nullColor config; falls back to theme defaults
insideMarginEdgeInsetsMiuixBreadcrumbBarDefaults.insideMargin (h:12/v:8)Inner padding
itemMaxWidthdoubleMiuixBreadcrumbBarDefaults.itemMaxWidth (160)Max width per segment
scrollControllerScrollController?nullHorizontal scroll controller

Example:

dart
MiuixBreadcrumbBar(
  items: [
    MiuixBreadcrumbItem(path: 'root', text: 'Root'),
    MiuixBreadcrumbItem(path: 'docs'),
  ],
  onItemClick: (i) {},
)

MiuixBreadcrumbItem

A single path segment (@immutable).

ParameterTypeDefaultDescription
pathStringrequiredPath segment used to rebuild the full path
textString?nullDisplay text; shows path when null

MiuixBreadcrumbItemsPath

An extension on List<MiuixBreadcrumbItem>. Joins all path segments' path field with a separator, useful for rebuilding the full path.

Method signatureReturnsDescription
joinToPath({String separator = '/'})StringJoins all items' path field with separator

Example:

dart
final items = [
  MiuixBreadcrumbItem(path: 'home'),
  MiuixBreadcrumbItem(path: 'docs'),
  MiuixBreadcrumbItem(path: 'api'),
];
final full = items.joinToPath(); // 'home/docs/api'

MiuixBreadcrumbBarColors

Breadcrumb color config (@immutable).

ParameterTypeDefaultDescription
colorColorrequiredNormal segment foreground color
highlightColorColorrequiredHighlighted segment foreground color
disabledColorColorrequiredDisabled foreground color
separatorColorColorrequiredSeparator chevron color
backgroundColorColorrequiredNormal segment background color
highlightBackgroundColorColorrequiredHighlighted segment background color
disabledBackgroundColorColorrequiredDisabled background color

MiuixBreadcrumbBarDefaults

Breadcrumb defaults (private constructor).

ConstantValueDescription
insideMarginEdgeInsets(h:12, v:8)Inner padding
itemHeight32Segment height
itemHorizontalPadding10Segment horizontal padding
itemMaxWidth160Segment max width

Static method defaultColors(BuildContext) → MiuixBreadcrumbBarColors: builds default colors from the current theme.

MiuixVerticalScrollBar

Vertical scroll bar. Supports hover/drag highlight and auto fade-out.

ParameterTypeDefaultDescription
keyKey?Widget key
adapterMiuixScrollBarAdapterrequiredBound scroll adapter
reverseLayoutboolfalseWhether to reverse layout
trackPaddingEdgeInsetsEdgeInsets.zeroTrack padding
colorsMiuixScrollBarColorsMiuixScrollBarDefaults.colorsColor config
thumbWidthdoubleMiuixScrollBarDefaults.thumbWidth (3.64)Thumb width
cornerRadiusdouble?nullCorner radius; defaults to thumbWidth/2 when null
thumbMinLengthdoubleMiuixScrollBarDefaults.thumbMinLength (36)Minimum thumb length
endPaddingdoubleMiuixScrollBarDefaults.endPadding (3.46)End padding

Example:

dart
final controller = ScrollController();
Stack(children: [
  ListView(controller: controller, children: [/* ... */]),
  Positioned(right: 0, top: 0, bottom: 0,
    child: MiuixVerticalScrollBar(adapter: MiuixScrollBarAdapter(controller))),
])

MiuixHorizontalScrollBar

Horizontal scroll bar. Parameters are identical to MiuixVerticalScrollBar.

ParameterTypeDefaultDescription
keyKey?Widget key
adapterMiuixScrollBarAdapterrequiredBound scroll adapter
reverseLayoutboolfalseWhether to reverse layout
trackPaddingEdgeInsetsEdgeInsets.zeroTrack padding
colorsMiuixScrollBarColorsMiuixScrollBarDefaults.colorsColor config
thumbWidthdoubleMiuixScrollBarDefaults.thumbWidth (3.64)Thumb width
cornerRadiusdouble?nullCorner radius; defaults to thumbWidth/2 when null
thumbMinLengthdoubleMiuixScrollBarDefaults.thumbMinLength (36)Minimum thumb length
endPaddingdoubleMiuixScrollBarDefaults.endPadding (3.46)End padding

MiuixScrollBarAdapter

Unified adapter over a Flutter ScrollController.

ParameterTypeDefaultDescription
controllerScrollControllerrequired (positional)The scroll controller to adapt

Key members: scrollOffset, viewportSize, contentSize, maxScrollOffset, scrollTo(double) (jump to a content offset, clamped to the valid range).

MiuixScrollBarColors

Scroll bar colors; null means unset (@immutable).

ParameterTypeDefaultDescription
thumbColorColor?nullThumb color
trackColorColor?nullTrack color

MiuixScrollBarDefaults

Scroll bar defaults (private constructor).

ConstantValueDescription
thumbWidth3.64Thumb width
endPadding3.46End padding
thumbMinLength36Minimum thumb length
fadeDelayMillis1000Fade delay (ms)
fadeDurationMillis500Fade duration (ms)
touchTargetWidth48Touch target width
dragThumbWidth6Thumb width while dragging
thumbAlpha0.1Default thumb alpha
dragThumbAlpha0.3Thumb alpha while dragging
dragAnimationDurationMillis150Drag highlight animation duration (ms)
colorsMiuixScrollBarColors()Default colors (all null)

Static method defaultColors(BuildContext) → MiuixScrollBarColors: returns the default colors.

Released under the Apache-2.0 License.