Skip to content

Releases: bdlukaa/fluent_ui

4.0.1

28 Sep 16:01
Compare
Choose a tag to compare
  • PaneItemAction.body is no longer required (#545)
  • Added DropDownButton.onOpen and DropDownButton.onClose callbacks (#537)
  • Ensure MenuFlyoutItem.onPressed is called after the flyout is closed if DropDownButton.closeAfterClick is true (#520)
  • Ensure the TimePicker and DatePicker popups will fit if the screen is small (#544)
  • Do not apply padding to NavigationAppBar.leading (#539)
  • Added AutoSuggestBox.noResultsFoundBuilder (#542)
  • Added AutoSuggestBox.inputFormatters (#542)

Full Changelog: v4.0.0...v4.0.1

4.0.0

25 Sep 20:57
Compare
Choose a tag to compare
  • BREAKING Removed NavigationBody. Use PaneItem.body instead (#510/#531):
    Before:

    NavigationView(
      pane: NavigationPane(
        items: [
          PaneItem(icon: Icon(FluentIcons.add)),
          PaneItem(icon: Icon(FluentIcons.add)),
          PaneItem(icon: Icon(FluentIcons.add)),
        ],
      ),
      content: NavigationBody(
        children: [
          _Item1(),
          _Item2(),
          _Item3(),
        ],
      ),
    ),

    Now:

    NavigationView(
      ...
      pane: NavigationPane(
        items: [
          PaneItem(
            icon: Icon(FluentIcons.add),
            body: _Item1(),
          ),
          PaneItem(
            icon: Icon(FluentIcons.add),
            body: _Item2(),
          ),
          PaneItem(
            icon: Icon(FluentIcons.add),
            body: _Item3(),
          ),
        ],
      ),
    ),

    Or if you don't have a pane, you can use the content like the following:

    NavigationView(
      content: ScaffoldPage(
        header: PageHeader(
          title: titleRow,
        ),
        content: child,
      ),
    ),

    either one attribute of pane or content must not be null

    Use NavigationView.transitionsBuilder to create custom transitions

  • Added PaneItem.onTap (#533)

  • BREAKING AutoSuggestBox dynamic type support (#441):

    Before:

    AutoSuggestBox(
      items: cats.map((cat) {
        return AutoSuggestBoxItem(
          value: cat,
          onFocusChange: (focused) {
            if (focused) debugPrint('Focused $cat');
          }
        );
      }).toList(),
      onSelected: (item) {
        setState(() => selected = item);
      },
    ),

    Now:

    AutoSuggestBox<String>(
      items: cats.map((cat) {
        return AutoSuggestBoxItem<String>(
          value: cat,
          label: cat,
          onFocusChange: (focused) {
            if (focused) debugPrint('Focused \$cat');
          }
        );
      }).toList(),
      onSelected: (item) {
        setState(() => selected = item);
      },
    ),
  • Compact pane is no longer toggled when item is selected (#533).
    To toggle it programatically, use NavigationViewState.toggleCompactOpenMode when an item is tapped

  • Dynamic header height for open pane (#530)

  • Fixes memory leaks on NavigationView

  • TreeView updates:

    • All items of the same depth level now have the same indentation. Before, only items with the same parent were aligned.

    • The hitbox for the expand icon of each item now uses the item's full height and is three times wider than the actual icon. This corresponds to the implementation in the explorer of Windows 10/11.

    • You can now choose whether the items of a TreeView should use narrow or wide spacing.

    • Do not invoke the tree view item on secondary tap (#526)

    • BREAKING TreeView.onSecondaryTap is now a (TreeViewItem item, TapDownDetails details) callback:
      Before:

      TreeView(
        ...,
        onSecondaryTap: (item, offset) async {}
      ),

      Now:

      TreeView(
        ...,
        onSecondaryTap: (item, details) {
          final offset = details.globalPosition;
        },
      )
    • Expand/collape items with right and left arrow keys, respectively (#517)

    • Added TreeView.onItemExpandToggle and TreeViewItem.onExpandToggle (#522)

What's Changed

Read more

4.0.0 release candidate 3

02 Sep 13:34
Compare
Choose a tag to compare
  • DisableAcrylic now fully disable transparency of its decendents Acrylics (#468)
  • Do not interpolate between infinite constraints on TabView (#430)
  • Do not rebuild the TimePicker popup when already rebuilding (#437)
  • ToggleSwitch updates:
    • Use the correct color for DefaultToggleSwitchThumb (#463)
    • Added ToggleSwitch.leadingContent, which positions the content before the switch (#464)
    • Added ToggleSwitch.thumbBuilder, which builds the thumb based on the current state
  • Added TextChangedReason.cleared, which is called when the text is cleared by the user in an AutoSuggestBox (#461)
  • Call AutoSuggestBox.onChanged when an item is selected using the keyboard (#483)
  • Tooltip overlay is now ignored when hovered (#443)
  • Do not add unnecessary padding in DropdownButton (#475)
  • ComboBox updates:
    • BREAKING Renamed Combobox to ComboBox
    • BREAKING Renamed ComboboxItem to ComboBoxItem
    • BREAKING Renamed ComboBox.backgroundColor to ComboBox.popupColor
    • Implement EditableComboBox, a combo box that accepts items that aren't listed (#244)
    • ComboBox.isExpanded: false now correctly sets the button width (#382)
    • ComboBox's items height are correctly calculated, as well as initial scroll offset (#472)
    • BREAKING ComboBox.disabledHint was renamed to ComboBox.disabledPlaceholder
    • Added ComboBoxFormField and EditableComboBoxFormField (#373)
    • ComboBox.comboBoxColor is now correctly applied (#468)
    • ComboBox popup can't be opened if disabled
  • Implemented PaneItemExpander (#299)
  • TimePicker and DatePicker popup now needs a minimum width of 260 (#494)
  • Correctly align NavigationAppBar content (#494)
  • BREAKING Added InfoLabel.rich. InfoLabel is no longer a constant contructor (#494)
  • Always add GlobalMaterialLocalizations above ReorderableListView (#492)
  • BREAKING Removed ContentDialog.backgroundDismiss. Use showDialog.barrierDismissable (#490)
  • Reviewed focus (#496)
    • DatePicker and TimePicker now show the focus highlight.
      Their popup now can be controlled using the keyboard
    • NavigationBody now uses a FocusTraversalGroup to handle focus
      This means the the content of the body will be fully traversed before moving on to another widget or group of widgets. Learn more
    • TreeViewItem now shows the focus highlight. They can also be selected using the keyboard
    • Expander now shows the focus highlight
  • Progress Indicators velocity is no longer affected by device frame rate (#502)
  • Added AutoSuggestBox.enabled (#504)
  • Correctly keep the NavigationView animation state (cf0fae1 ,bd89ba6)
  • Calculate selected for all parents as soon as the TreeView is built

What's Changed

New Contributors

Full Changelog: v4.0.0-pre.3...v4.0.0-pre.4

4.0.0 release candidate 3

13 Aug 12:27
Compare
Choose a tag to compare
Pre-release
  • NavigationView mode fixes:

    • When top overflow menu is opened, PaneItemHeader no longer throws an unsupported error
    • When on top mode, PaneItemHeader is properly aligned to the other items.
    • Added NavigationPaneThemeData.headerPadding, which is applied to PaneItemHeader on open, compact and minimal mode. It defaults to 10 pixels at the top
    • BREAKING PaneItem.getPropertyFromTitle is now widget.getProperty:

    Before:
    getPropertyFromTitle<TextStyle>()

    Now:
    title.getProperty<TextStyle>()

    This was changed because the properties of PaneItemHeader needed to be accessed, but the old version only supported to get the properties of PaneItem.title. It can be called on a Text, RichText or in an Icon widget

    • InheritedNavigationView is now accessible on the top overflow menu
    • Added NavigationPaneThemeData.selectedTopTextStyle and NavigationPaneThemeData.unselectedTopTextStyle, which is applied to the items on top mode
    • Fixed content focus on minimal mode
    • Updated default transitions for top mode: HorizontalSlidePageTransition
  • Fix incorrect translation of TimePicker in Traditional Chinese.

  • Added ScaffoldPage.resizeToAvoidBottomInset (#444)

  • Consider view padding for NavigationAppBar

  • Scrollbar updates (#356):

    • Correctly use backgroundColor to display the track color
    • Added padding and hoveringPadding
    • Check if animation is disposed before using it (#446)
  • Update AutoSuggestBox (#450):

    • Added .enableKeyboardControls. When true, items can be selected using the keyboard (#19)
    • Added .sorter, which lets you set a custom sort function for the suggestions. AutoSuggestBox.defaultItemSorter is used by default
    • Overlay's height is now correctly calculated based on the screen size. It no longer overlaps the screen. viewPadding is also taken into consideration
    • Close the overlay if the textbox width is changes (#456)
    • .items can be dynamically loaded (#387)
    • BREAKING .items is now a List<AutoSuggestBoxItem>:
      Before:
    AutoSuggestBox(
      items: [
        'Cat',
        'Dog',
        'Bird',
        'Horse',
      ],
      ...
    ),

    Now:

    AutoSuggestBox(
      items: [
        'Cat',
        'Dog',
        'Bird',
        'Horse',
      ].map((animal) {
        return AutoSuggestBoxItem(
          value: animal, // this takes a String
          child: Text('Animal $animal'), // this takes a Widget. If null, value is displayed as a text
          onFocusChange: (focused) {
            // this is called when the item is focused using the keyboard arrow keys
            if (focused) debugPrint('Focused animal $animal');
          },
          onSelected: () {
            // this is called when the item is selected
            debugPrint('Selected animal $animal');
          }
        );
      }).toList(),
      ...
    )
  • Combobox updates (#454):

    • Popup size is now correctly calculated (#413)
    • Correctly clip the popup while performing the animation (#379)
  • Correctly check if a locale is supported (#455)

Release candidate 2

  • Remove whitespace on ContentDialog if title is omitted (#418)
  • Apply correct color to the Date and Time Pickers button when selected (#415, #417)
  • Expose more useful properties to AutoSuggestBox (#419)
  • BREAKING PopupContentSizeInfo was renamed to ContentSizeInfo
  • Reworked ListTile (#422):
    • BREAKING Removed TappableListTile
    • Added support for single and multiple selection. Use ListTile.selectable (#409)
    • Added focus support
    • Use the Win UI design
  • Reviewed animation durations (#421)
    • BREAKING Removed .animationDuration and .animationCurve from ScrollbarThemeData
    • Added expandContractAnimationDuration and contractDelay to ScrollbarThemeData
  • NavigationPaneSize constraints are now correctly applied when in open mode (#336)
  • NavigationIndicator can't be invisble anymore when animation is stale (#335)
  • Updated TabView:
    • BREAKING Removed TabView.bodies. Now, Tab.body is used.
      Before

      TabView(
        tabs: [
          Tab(text: Text('Tab 1')),
          Tab(text: Text('Tab 2')),
        ],
        bodies: [
          Tab1Body(),
          Tab2Body(),
        ],
      ),

      Now:

      TabView(
        tabs: [
          Tab(
            text: Text('Tab 1'),
            body: Tab1Body(),
          ),
          Tab(
            text: Text('Tab 2'),
            body: Tab2Body(),
          ),
        ],
      ),
    • Updated TabView tabs' constraints and padding

    • Fixed tab width when TabWidthBehavior is compact

    • FlutterLogo is no longer the default tab Icon

  • DropDownButton menu is now sized correctly according to the screen size
  • If there isn't enough space to display the menu on the preferred position, Flyout will display on the opposite position (#435)

Release candidate 1

  • Exposed private properties that makes it easier to create custom panes for NavigationView (#365):

    • kCompactNavigationPaneWidth
    • kOpenNavigationPaneWidth
    • NavigationPane.changeTo
    • PaneItem.getPropertyFromTitle
  • PaneScrollConfiguration is now applied to custom pane on NavigationView

  • Added NavigationViewState.displayMode. It results in the current display mode used by the view, including the automatic display mode (#360):

    // Define the key
    final key = GlobalKey<NavigationViewState>();
    
    NavigationView(
      // pass the key to the view
      key: key,
      ...,
    )
    
    // Get the current display mode. Note that, in order to find out the automatic display mode,
    // the widget must have been built at least once
    final PaneDisplayMode currentDisplayMode = key.currentState.displayMode;
  • The app bar action no longer overflow when minimal pane/compact overlay is open (#361)

  • Update AutoSuggestBox:

    • It now uses Acrylic, but it can be disabled using DisableAcrylic
    • TextChangedReason.suggestionChoosen is now called properly
  • Updated TextBox:

    • TextBox colors were updated to match the Win 11 design.
    • Fluent Text Selection Control now make use of Acrylic. Its items were also updated
  • Updated pickers (#406):

    • If selected is null, a placeholder text is shown (#306)
    • Added new localization messages: hour, minute, AM, PM, month, dayand year.
    • BREAKING Removed .hourPlaceholder, .minutePlaceholder, .amText, .pmText from TimePicker. It was replaced, respectivelly, by the hour, minute, AM, PM localization messages
    • On DatePicker, it's now possible to change the order of the fields:
    DatePicker(
      ...,
      fieldOrder: [
        DatePickerField.day,
        DatePickerField.month,
        DatePickerField.year,
      ],
    )

    The fields are ordered based on the current locale by default

    • On DatePicker, the day and year fields are now formatted based on the current locale (getDateOrderFromLocale)
  • Update Slider (#405):

    • Added .thumbRadius and .trackHeight to SliderThemeData
    • The active track now isn't taller than the inactive track

What's Changed

Read more

Flutter 3.0.0

13 May 17:52
29f678a
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.11.1...v3.12.0

v3.11.1

30 Apr 13:30
9ba6b81
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.11.0...v3.11.1

v3.11.0 - Menu Flyouts

23 Apr 13:37
Compare
Choose a tag to compare

What's Changed

Full Changelog: v.3.10.3...v3.11.0

3.10.3

15 Apr 11:19
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @imp-sike made their first contribution in #288

Full Changelog: v3.10.1...v.3.10.3

Indicators hotfix

06 Apr 21:28
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v.3.10.0...v3.10.1

Localization, Indicators, CommandBar and Flyouts

02 Apr 19:55
Compare
Choose a tag to compare
  • Improves icons.dart formatting and its generation (#215)
  • Use correct color on FilledButton when disabled (209)
  • Built-in support for new languages (#216):
  • Add useInheritedMediaQuery property to FluentApp (#211)
  • TreeView updates (#255):
    • Optional vertical scrolling by setting shrinkWrap to false
    • TreeViewItem now has a custom primary key (value field)
    • Added onSelectionChanged callback, called when the selection is changed
  • Account for enabled on pressing states (#233)
  • Implement CommandBar (#232)
    • Add DynamicOverflow layout widget, for one-run horizontal or vertical layout with an overflow widget
    • Add HorizontalScrollView helper widget, with mouse wheel horizontal scrolling
  • Long content widget no longer overflow in ContentDialog (#242)
  • Content state is no longer lost when the pane display mode is changed (#250)
  • BREAKING Update indicators (#248):
    • Added InheritedNavigationView

    • Updated sticky indicator to match the latest Win 11 UI (#173)

    • BREAKING Renamed NavigationPane.indicatorBuilder to NavigationPane.indicator

    • BREAKING Indicators are no longer built with functions
      Before:

      indicatorBuilder: ({
        required BuildContext context,
        required NavigationPane pane,
        required Axis axis,
        required Widget child,
      }) {
        if (pane.selected == null) return child;
        assert(debugCheckHasFluentTheme(context));
        final theme = NavigationPaneTheme.of(context);
      
        final left = theme.iconPadding?.left ?? theme.labelPadding?.left ?? 0;
        final right = theme.labelPadding?.right ?? theme.iconPadding?.right ?? 0;
      
        return StickyNavigationIndicator(
          index: pane.selected!,
          pane: pane,
          child: child,
          color: theme.highlightColor,
          curve: Curves.easeIn,
          axis: axis,
          topPadding: EdgeInsets.only(left: left, right: right),
        );
      }

      Now:

      indicator: StickyNavigationIndicator(
        color: Colors.blue.lighter, // optional
      ),
  • initiallyExpanded property on Expander works properly (#252)
  • BREAKING Flyout changes:
    • Removed Flyout.contentWidth and added FlyoutContent.constraints. Now the content will be automatically sized and layed out according to the placement
    • Added Flyout.placement which takes a FlyoutPlacement
    • Added Flyout.openMode which takes a FlyoutOpenMode
    • Flyout.controller is no longer required. If not provided, a local controller is created to handle the Flyout.openMode settings
    • Breaking FlyoutController.open is now a function
    • Added FlyoutController.isOpen, FlyoutController.isClosed, FlyoutController.close(), FlyoutController.open() and FlyoutController.toggle()
    • Breaking Removed Popup.contentHeight
  • BREAKING Updated typography (#261):
    • Renamed Typography.standart to Typography.fromBrightness
    • Renamed Typography constructor to Typography.raw
    • Default color for dark mode is now const Color(0xE4000000)
    • Updated default font sizes for display, titleLarge, title and subtitle
  • TabWidthBehavior.sizeToContent now works properly (#218)

What's Changed

New Contributors

Full Changelog: v3.9.1...v.3.10.0