Skip to content

0.0.50

Choose a tag to compare

@sunarya-thito sunarya-thito released this 12 Feb 07:17
· 70 commits to master since this release

Added

  • Add min/max limits to increment/decrement input buttons and disable at bounds

Fixed

  • Fixed clip behavior in Dialog overlay widget
  • Removed haptic on iOS

Breaking Changes

  • [BREAKING] Navigation selection model changed from index-based (int) to
    key-based (Key?) across NavigationBar, NavigationRail, and
    NavigationSidebar (commits 53d2d8c, 8d3104a, 9ef28a8)
    • index parameter removed; use selectedKey instead
    • onSelected callback signature changed from ValueChanged<int>? to
      ValueChanged<Key?>?
    • NavigationItem.index parameter removed; use the widget's key for
      selection identity
  • [BREAKING] NavigationBarItem abstract class removed; children parameters now
    accept List<Widget> instead of List<NavigationBarItem>
  • [BREAKING] NavigationContainerMixin (and its wrapChildren method) removed
  • [BREAKING] NavigationChildControlData and NavigationGroupControlData
    classes removed
  • [BREAKING] NavigationBar.constraints parameter removed; use expandedSize
    and collapsedSize instead
  • [BREAKING] Several NavigationBar parameters changed from nullable with theme
    fallback to non-nullable with explicit defaults:
    • alignment (NavigationBarAlignment?NavigationBarAlignment, default:
      start)
    • labelType (NavigationLabelType?NavigationLabelType, default: all)
    • labelPosition (NavigationLabelPosition?NavigationLabelPosition,
      default: bottom)
    • labelSize (NavigationLabelSize?NavigationLabelSize, default:
      small)
    • expanded (bool?bool, default: false)
  • [BREAKING] NavigationBar.expands parameter removed
  • [BREAKING] NavigationGap, NavigationDivider, NavigationLabel, and
    NavigationWidget no longer implement NavigationBarItem

Migration guide:

  1. Replace index / onSelected with selectedKey / key-based callback.
// before
NavigationBar(
  index: selectedIndex,
  onSelected: (index) => setState(() => selectedIndex = index),
  children: [
    NavigationItem(label: Text('Home'), child: Icon(Icons.home)),
    NavigationItem(label: Text('Search'), child: Icon(Icons.search)),
  ],
)

// after
NavigationBar(
  selectedKey: selectedKey,
  onSelected: (key) => setState(() => selectedKey = key),
  children: [
    NavigationItem(key: ValueKey('home'), label: Text('Home'), child: Icon(Icons.home)),
    NavigationItem(key: ValueKey('search'), label: Text('Search'), child: Icon(Icons.search)),
  ],
)
  1. Remove any NavigationBarItem type annotations; use Widget instead.
  2. Remove any usage of NavigationContainerMixin, NavigationChildControlData,
    or NavigationGroupControlData.
  3. Replace NavigationBar(constraints: ...) with expandedSize /
    collapsedSize.