Skip to content

3.0.0

Latest

Choose a tag to compare

@codenameakshay codenameakshay released this 20 Sep 07:44
a980edf

Published on pub.dev.

Breaking

  • Requires Dart >=3.12.0 and 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 to material_ui; migrated apps no longer need
    MaterialUiCompatibilityBridge for this package.
  • BottomBarLayout and BottomBarLayout.adaptive now default borderRadius
    to 28. Pass BorderRadius.zero for a square bar.

Added

  • BottomBarLayout.avoidKeyboard (default true): pads the bar and hidden
    action by MediaQuery.viewInsets.bottom so 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 affect BottomBarScope.barHeight or
    BottomBarBodyPadding.
  • BottomBarController.reportScroll({required double delta}): drives the
    bar's threshold/reverse/hideOnScroll visibility rules from a scroll
    source that never emits ScrollNotifications, such as an embedded WebView.
    Visibility-only — it does not affect scrollToStart()/scrollToEnd(),
    which still require a real ScrollPosition.
  • BottomBarLabelBehavior (alwaysShow, onlySelected, alwaysHide) and
    BottomBarItems.labelBehavior: controls when descendant BottomBarItem
    labels render. Exposed to BottomBarItem via the new public
    BottomBarItemsScope inherited widget; items outside a BottomBarItems
    row keep the alwaysShow default.
  • BottomBarScrollBehavior.keepVisibleOnFocus (default true): skips
    scroll-driven hide while the floating BottomBar.child holds 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,
    BottomBarItems wraps every child in Expanded, 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's Text label (with non-null data) is truncated to a
    single line with an ellipsis; Text.rich and other label widgets are
    unaffected.

  • Migrated from package:flutter/material.dart to the standalone
    material_ui package. 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
    MaterialUiCompatibilityBridge on account of this package — without it, the
    bar resolved Theme.of(context).colorScheme against 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_ui requires.

  • Attaching a BottomBarController to a second bar now throws a
    FlutterError in debug builds as well, instead of an AssertionError.

  • BottomBarLayout and BottomBarLayout.adaptive now default
    borderRadius to 28 so passing layout: no longer squares the bar.
    Pass BorderRadius.zero to 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.