Repository navigation
Published on pub.dev.
Breaking
- Requires Dart
>=3.12.0and Flutter>=3.44.0. - Material imports now come from
package:material_ui/material_ui.dart.
Apps still using the in-SDK Material must migrate their Material imports and
theme tomaterial_ui; migrated apps no longer need
MaterialUiCompatibilityBridgefor this package. BottomBarLayoutandBottomBarLayout.adaptivenow defaultborderRadius
to 28. PassBorderRadius.zerofor a square bar.
Added
BottomBarLayout.avoidKeyboard(defaulttrue): pads the bar and hidden
action byMediaQuery.viewInsets.bottomso they sit above the on-screen
keyboard when the host hasn't already consumed it (e.g.
Scaffold(resizeToAvoidBottomInset: false)). No-op when insets are already
zero, and does not affectBottomBarScope.barHeightor
BottomBarBodyPadding.BottomBarController.reportScroll({required double delta}): drives the
bar's threshold/reverse/hideOnScrollvisibility rules from a scroll
source that never emitsScrollNotifications, such as an embedded WebView.
Visibility-only — it does not affectscrollToStart()/scrollToEnd(),
which still require a realScrollPosition.BottomBarLabelBehavior(alwaysShow,onlySelected,alwaysHide) and
BottomBarItems.labelBehavior: controls when descendantBottomBarItem
labels render. Exposed toBottomBarItemvia the new public
BottomBarItemsScopeinherited widget; items outside aBottomBarItems
row keep thealwaysShowdefault.BottomBarScrollBehavior.keepVisibleOnFocus(defaulttrue): skips
scroll-driven hide while the floatingBottomBar.childholds focus, so a
search field or composer in the bar isn't hidden mid-scroll while the user
is typing.BottomBarController.hide()still hides the bar regardless of
focus; the bar is not auto-shown on focus.
Changed
-
In bounded rows wide enough for each item's 48x48 minimum target,
BottomBarItemswraps every child inExpanded, so items share the row's
width equally. Narrow bounded rows use a horizontal scroll view to preserve
the minimum targets; unbounded rows keep their raw children. A
BottomBarItem'sTextlabel (with non-nulldata) is truncated to a
single line with an ellipsis;Text.richand other label widgets are
unaffected. -
Migrated from
package:flutter/material.dartto the standalone
material_uipackage. Material was
decoupled from the Flutter SDK in 3.47; the in-SDK copy is
frozen to contributions
and scheduled for removal.
Apps that have already migrated no longer need
MaterialUiCompatibilityBridgeon account of this package — without it, the
bar resolvedTheme.of(context).colorSchemeagainst the framework Material
and silently fell back to a default theme. -
Minimum SDK constraints raised to Dart 3.12 / Flutter 3.44, which is what
material_uirequires. -
Attaching a
BottomBarControllerto a second bar now throws a
FlutterErrorin debug builds as well, instead of anAssertionError. -
BottomBarLayoutandBottomBarLayout.adaptivenow default
borderRadiusto 28 so passinglayout:no longer squares the bar.
PassBorderRadius.zeroto opt out.
Fixed
- Hidden bar descendants are excluded from keyboard focus, so a
TextField
in the floating child cannot be tab-focused while the bar is hidden.
Validation
135 package tests and 3 example tests passed on Flutter 3.44.4. The publish dry-run reported zero warnings. Existing example formatting and analyzer findings still block the full quality gate.