Implements Microsoft's WinUI3 in Flutter.
Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.1.4...v4.2.0
FlyoutListTile
can be used outside of a flyout (#650)key
parameter to NavigationPaneItem
and all its instances (#656)fontFamily
is inherit in some widgets (654)Flyout.navigatorKey
(#538)Card.borderColor
(#643)DatePicker
and TimePicker
popup (#663)AutoSuggestBox
items by long pressing arrow up and down keysAutoSuggestBox
(#671)AutoSuggestBox
's trailingIcon
now comes after the close buttonTextBox.clearGlobalKey
was remove, since it was not usedAutoSuggestBox.unfocusedColor
and TextFormBox.unfocusedColor
displayInfoBar
, which shows an info bar as an overlay (#673)ThemeData.extensions
(#674)Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.1.2...v4.1.4
PageHeader
now gives appropriate bounds to its commandBar
(#642)NavigationView
body state is not lost when resizing windowTabView
' tabs' state are not lost when changing selected tab (#607)trailing
in FlyoutContent
(#487)Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.1.1...v4.1.2
startYear
and endYear
in DateTime
are used properly (#627)TreeViewItem
(#632)NavigationPane.scrollBehavior
(#640)CommandBarCard.borderRadius
(#641)TextFormBox.initialValue
TreeViewState.toggleItem
, which toggles the item expanded state (#493)NavigationView
pane items are brought into view when selectedTreeView
selection state behavior for items that are not expanded (#578)NavigationView
is properly preserved (#607)ExpanderState.open
to ExpanderState.isExpanded
Expander
(#596)ToggleButton
border width is uniform (#610)startYear
and endYear
in DateTime
are used properly by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/637
Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.0.3...v4.1.1
NavigationView
scrollbar can now be dragged (#472)PaneItemHeader
can now be used inside a PaneItemExpander
(#575)InfoBadge
no longer overflows when transitioning from compact mode to open mode in NavigationView
(#588)Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.0.2...v4.0.3
NavigationView.paneBodyBuilder
for customization of widget built for body of pane. (#548)NavigationAppBar
unnecessary leading icon when no pane is provided in NavigationView
(#551)NavigationView.minimalPaneOpen
and, with it, the possibility to open minimal pane programatically (#564)NavigationView
compact mode transitionTreeView
updates (#555):
TreeViewItemInvokeReason
parameter to TreeView.onItemInvoked
and TreeViewItem.onInvoked
.TreeView.includePartiallySelectedItems
so that items who have children with a mixed selection state will be included in the onSelectionChanged
callback.TreeView.deselectParentWhenChildrenDeselected
optional behavior so that parent items can remain selected when all of their children are deselected.TreeViewItem.setSelectionStateForMultiSelectionMode
helper method and [TreeViewItem].selectedItems
extension method, to make it easier for application code to programmatically change selection state of items in a multi-selection mode tree view.Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.0.1...v4.0.2
PaneItemAction.body
is no longer required (#545)DropDownButton.onOpen
and DropDownButton.onClose
callbacks (#537)MenuFlyoutItem.onPressed
is called after the flyout is closed if DropDownButton.closeAfterClick
is true (#520)TimePicker
and DatePicker
popups will fit if the screen is small (#544)NavigationAppBar.leading
(#539)AutoSuggestBox.noResultsFoundBuilder
(#542)AutoSuggestBox.inputFormatters
(#542)Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.0.0...v4.0.1
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)
TextBox
review by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/352
AutoSuggestBox.form
by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/353
trackColor
and add inner padding
for Scrollbar by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/356
ScaffoldPage
example by @loic-sharma in https://github.com/bdlukaa/fluent_ui/pull/466
flutter gen-l10n command
instead of flutter intl plugin
to generate localizations by @DemoJameson in https://github.com/bdlukaa/fluent_ui/pull/518
Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v3.12.0...v4.0.0
DisableAcrylic
now fully disable transparency of its decendents Acrylic
s (#468)TabView
(#430)TimePicker
popup when already rebuilding (#437)ToggleSwitch
updates:
TextChangedReason.cleared
, which is called when the text is cleared by the user in an AutoSuggestBox
(#461)AutoSuggestBox.onChanged
when an item is selected using the keyboard (#483)Tooltip
overlay is now ignored when hovered (#443)DropdownButton
(#475)ComboBox
updates:
Combobox
to ComboBox
ComboboxItem
to ComboBoxItem
ComboBox.backgroundColor
to ComboBox.popupColor
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)ComboBox.disabledHint
was renamed to ComboBox.disabledPlaceholder
ComboBoxFormField
and EditableComboBoxFormField
(#373)ComboBox.comboBoxColor
is now correctly applied (#468)ComboBox
popup can't be opened if disabledPaneItemExpander
(#299)TimePicker
and DatePicker
popup now needs a minimum width of 260 (#494)NavigationAppBar
content (#494)InfoLabel.rich
. InfoLabel
is no longer a constant contructor (#494)GlobalMaterialLocalizations
above ReorderableListView
(#492)ContentDialog.backgroundDismiss
. Use showDialog.barrierDismissable
(#490)DatePicker
and TimePicker
now show the focus highlight.
Their popup now can be controlled using the keyboardNavigationBody
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 keyboardExpander
now shows the focus highlightAutoSuggestBox.enabled
(#504)NavigationView
animation state (cf0fae1 ,bd89ba6)selected
for all parents as soon as the TreeView
is builtScaffoldPage
example by @loic-sharma in https://github.com/bdlukaa/fluent_ui/pull/466
Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v4.0.0-pre.3...v4.0.0-pre.4
NavigationView
mode fixes:
PaneItemHeader
no longer throws an unsupported errorPaneItemHeader
is properly aligned to the other items.NavigationPaneThemeData.headerPadding
, which is applied to PaneItemHeader
on open, compact and minimal mode. It defaults to 10 pixels at the topPaneItem.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 menuNavigationPaneThemeData.selectedTopTextStyle
and NavigationPaneThemeData.unselectedTopTextStyle
, which is applied to the items on top modecontent
focus on minimal modeHorizontalSlidePageTransition
Fix incorrect translation of TimePicker
in Traditional Chinese.
Added ScaffoldPage.resizeToAvoidBottomInset
(#444)
Consider view padding for NavigationAppBar
Scrollbar
updates (#356):
backgroundColor
to display the track colorpadding
and hoveringPadding
Update AutoSuggestBox
(#450):
.enableKeyboardControls
. When true, items can be selected using the keyboard (#19).sorter
, which lets you set a custom sort function for the suggestions. AutoSuggestBox.defaultItemSorter
is used by defaultviewPadding
is also taken into consideration.items
can be dynamically loaded (#387).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):
Correctly check if a locale is supported (#455)
ContentDialog
if title is omitted (#418)AutoSuggestBox
(#419)PopupContentSizeInfo
was renamed to ContentSizeInfo
ListTile
(#422):
TappableListTile
ListTile.selectable
(#409).animationDuration
and .animationCurve
from ScrollbarThemeData
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)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 sizeFlyout
will display on the opposite position (#435)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
:
Acrylic
, but it can be disabled using DisableAcrylic
TextChangedReason.suggestionChoosen
is now called properlyUpdated TextBox
:
TextBox
colors were updated to match the Win 11 design.Acrylic
. Its items were also updatedUpdated pickers (#406):
selected
is null, a placeholder text is shown (#306)hour
, minute
, AM
, PM
, month
, day
and year
..hourPlaceholder
, .minutePlaceholder
, .amText
, .pmText
from TimePicker
. It was replaced, respectivelly, by the hour
, minute
, AM
, PM
localization messagesDatePicker
, 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
DatePicker
, the day and year fields are now formatted based on the current locale (getDateOrderFromLocale
)Update Slider
(#405):
.thumbRadius
and .trackHeight
to SliderThemeData
TextBox
review by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/352
AutoSuggestBox.form
by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/353
trackColor
and add inner padding
for Scrollbar by @bdlukaa in https://github.com/bdlukaa/fluent_ui/pull/356
Full Changelog: https://github.com/bdlukaa/fluent_ui/compare/v3.12.0...v4.0.0-pre.3