- Bump Flutter minimum supported version from 3.0 to 3.19.0.
- Bump Dart minimum supported version from 2.17.0 to 3.3.0.
- Change the default font family of pull-down menu items to
CupertinoSystemText
as it is the current default font family in Flutter's cupertino widgets.
- Add
useRootNavigator
toPullDownButton
andshowPullDownMenu
(#49). Thanks to @gborges9. - Add
routeSettings
toPullDownButton
andshowPullDownMenu
(#53). - Add
isOpen
helper getter toPullDownMenuButtonBuilder
(#52). Thanks to @vizakenjack. - Add
PullDownMenuHeader.leadingBuilder
to allow a more flexible creation of the header's leading widget (#50).
- Add
animationAlignmentOverride
toPullDownButton
. This feature is experimental and may be removed in the future versions. - Add example for
PullDownButton.animationAlignmentOverride
.
- Add
scrollController
toPullDownButton
,PullDownMenu
andshowPullDownMenu
to allow passing custom scroll controller (#31).
- Breaking: remove
initialScrollOffset
fromPullDownButton
,PullDownMenu
andshowPullDownMenu
to allow more precise scroll controller customization usingscrollController
.
- Fix menu items being "stuck" in the highlighted mode in scrollable menus (partially #29).
- Add
menuOffset
toPullDownButton
andshowPullDownMenu
to allow customizing the menu's horizontal offset (#32). - Expose
initialScrollOffset
from internal scrollable toPullDownButton
,PullDownMenu
andshowPullDownMenu
to allow customizing initial scroll offset (#31).
- Use correct image for
PullDownMenuHeader
in README.
- Update the following stuff based on guidelines defined in the Apple Design Resources Sketch file:
- Update menu blur to include color saturation.
- Update the
PullDownMenuItem
layout. - Update the
PullDownMenuTitle
layout. - Update default height for
PullDownMenuActionsRow
. - Update default height for
PullDownMenuTitle
. - Update default theme values for all sub-themes.
- Update the example app to include newly added stuff.
- Deprecate
PullDownMenuDivider
andPullDownMenuDivider.wrapWithDivider
. Menu now inserts small dividers automatically. - Breaking: rename
PullDownMenuRouteTheme.largeTextScaleWidth
toPullDownMenuRouteTheme.accessibilityWidth
.
- Add
PullDownMenuHeader
. Based on UIDocumentProperties from iOS 16. - Add
subtitle
toPullDownMenuItem
andPullDownMenuItem.selectable
. - Add
PullDownMenuTitle.alignment
to allow customizing alignment ofPullDownMenuTitle
. - Add
subtitleStyle
,onHoverBackgroundColor
,onPressedBackgroundColor
, andonHoverTextColor
toPullDownMenuItemTheme
.
- Breaking: remove
dividerColor
fromPullDownMenuActionsRow
. - Breaking: remove
iconSize
,checkmarkWeight
,checkmarkSize
fromPullDownMenuItemTheme
. - Breaking: remove
onHoverColor
fromPullDownMenuItemTheme
. UseonHoverBackgroundColor
instead. - Breaking: remove
onHoverTextStyle
fromPullDownMenuItemTheme
. UseonHoverTextColor
instead. - Breaking: remove
beginShadow
andendShadow
fromPullDownMenuRouteTheme
. Useshadow
instead.
- Update menu items layouts to support all options in iOS 16 "Large Text" accessibility menu.
PullDownMenuRouteTheme.largeTextScaleWidth
to allow customizing the menu's "accessibility" width.
- Rename all nullable
of(context)
methods tomaybeOf(context)
to follow Flutter repo style.
- Add
PullDownButton.buttonAnchor
to allow "anchoring" menu to specific button side (#22). - Add an example for
PullDownButton.buttonAnchor
. See Examples -> Advanced in the example app. - Add haptic feedback when sliding between items (as seen in iOS).
-
Add precautions to menu position calculations for cases when
PullDownButton.buttonBuilder
's height is bigger than the screen height (#21).Consider using
showPullDownMenu
if the end position calculated using those precautions is not what was desired.
- Breaking:
showPullDownMenu
position now requiresRect
instead ofRelativeRect
. - Reworked the way the pull-down menu calculates its position on the screen:
- Updated menu's scale transition alignment calculation to closely match native.
- If opened from the left or right side of the screen (but not directly near the edge), additionally move the menu to the left or right by a certain amount of pixels (based on the native compare tool).
- Add
PullDownMenuItem.delayedTapHandler
. - Add
PullDownButton.animationBuilder
to allow customization of animation forPullDownButton.buttonBuilder
when the pull-down menu is opening or closing. - Add an example for
PullDownButton.animationBuilder
. See Examples -> Advanced in the example app.
- Breaking: remove
PullDownMenuPosition.under
andPullDownMenuPosition.above
.PullDownMenuPosition.automatic
should be used instead (new default). - Breaking: remove
buttonSize
andmenuPosition
fromshowPullDownMenu
. - Breaking:
PullDownButton.applyOpacity
andPullDownButtonTheme.applyOpacity
. To remove opacity animation fromPullDownButton.buttonBuilder
setPullDownButton.animationBuilder
to null. - Breaking: remove
PullDownButton.offset
.
-
Add "continuous swipe" support to menus (see demo) (#19, #18).
Thanks to @iSa1vatore.
- Update
PullDownMenuItem.defaultTapHandler
to work withPullDownMenu
.
- Add
PullDownMenu
- a pull-down menu as a simple widget, with no animations or adding routes to the navigation stack (#17).
- Add
PullDownMenuItem.tapHandler
to allow customization of howPullDownMenuItem.onTap
is handled (#16). - Add an example for
PullDownMenuItem.tapHandler
. See Examples -> Advanced in the example app.
- Add clamped animation for menu animations, updated shadow animation.
- Fix
PullDownMenuItemTheme.lerp
using incorrect text styles for lerping.
-
Add menu height transition and updated open animation curve (#14, #15).
Thanks to @iSa1vatore.
- Fix the
PullDownMenuActionsRow
items content not being centered.
- Update padding values for
PullDownMenuItem
. - Update open/close animation curves - open curve now includes "bouncy" effect native counterpart has (#13).
- Note: new curves are still not 100% equal to native, but slightly more similar than before.
- Apply an additional small amount of padding for menu positioning if the button is smaller than 44px.
- Update text style, checkmark configuration in
PullDownMenuItemTheme
defaults. - Update shadows for dark mode in
PullDownMenuRouteTheme
defaults.
- Add
PullDownMenuItemsOrder
- an ordering logic forPullDownButton
andshowPullDownMenu
items. - Add native compare tool.
- Fix
PullDownMenuItem.itemTheme.textStyle
being overridden by globalPullDownButtonTheme.itemTheme.textStyle
during text styles marge inPullDownMenuItem
andPullDownMenuTitle
if both are not null.
- Breaking:
PullDownMenuEntry
no longer extendsStatelessWidget
, it now extendsWidget
. This was done to allowStatefulWidget
s to be used asPullDownMenuEntry
(#11). - Breaking:
PullDownMenuEntry
no longer provides fields to override due to their redundancy. - Following things have been updated to be a lot closer to native variant:
- Menu open / close animation to use scaling transition.
PullDownMenuTitle
- minimum height to be equal to native variant.- Default colors for
PullDownMenuDividerTheme
andPullDownMenuRouteTheme
. - On menu open opacity for
PullDownButton.buttonBuilder
. PullDownMenuItem
text style and icon color opacity whenPullDownMenuItem.enabled
is false.
PullDownMenuItem
andPullDownMenuTitle
- merge default text styles with provided ones (via theme or widget parameters).
- Add
showPullDownMenu
- an alternative way to display menu (#12).
- Update menu to not use
BackdropFilter
for blur used in pull-down menu if menu's background color is fully opaque (#9).
Please see README for detailed info about new sub-themes.
- Modularize
PullDownButtonTheme
- all properties where split into 4 sub-themes:- routeTheme - menu container theme (
PullDownMenuRouteTheme
). - itemTheme -
PullDownMenuItem
theme (PullDownMenuItemTheme
). - dividerTheme -
PullDownMenuDivider
theme (PullDownMenuDividerTheme
). - titleTheme -
PullDownMenuTitle
theme (PullDownMenuTitleTheme
).
- routeTheme - menu container theme (
- All customization options that were previously available on menu items are now also using sub-themes.
Migration
PullDownButtonTheme(
backgroundColor: colorScheme.surface,
dividerColor: colorScheme.outline,
largeDividerColor: colorScheme.outlineVariant,
destructiveColor: colorScheme.error,
textStyle: TextStyle(
color: colorScheme.onSurface,
),
titleStyle: TextStyle(
color: colorScheme.onSurface,
),
widthConfiguration: const PullDownMenuWidthConfiguration(280),
)
PullDownButtonTheme(
routeTheme: PullDownMenuRouteTheme(
backgroundColor: colorScheme.surface,
width: 280,
),
dividerTheme: PullDownMenuDividerTheme(
dividerColor: colorScheme.outline,
largeDividerColor: colorScheme.outlineVariant,
),
itemTheme: PullDownMenuItemTheme(
destructiveColor: colorScheme.error,
textStyle: TextStyle(
color: colorScheme.onSurface,
),
),
titleTheme: PullDownMenuTitleTheme(
style: TextStyle(
color: colorScheme.onSurface,
),
),
)
- Add customization of menu's border radius, begin and end shadows to
PullDownMenuRouteTheme
(#8).
- Breaking: replace
SelectablePullDownMenuItem
withPullDownMenuItem.selectable
. - Breaking: remove
PullDownMenuIconAction
-PullDownMenuActionsRow
now usesPullDownMenuItem
. - Breaking: remove
PullDownMenuWidthConfiguration
- usePullDownMenuRouteTheme.width
.
- Fix incorrect padding values for RTL (#7).
- Add
PullDownMenuActionsRow
- displays multiple actions in a row (from iOS 16). - Add new example app.
- Breaking: update
PullDownMenuDivider
's constructors - deprecate (removed any usages)dividerColor
andlargeDividerColor
fromPullDownMenuDivider
andPullDownMenuDivider.large
respectively. Both constructors now use samecolor
property. - Default
PullDownMenuPosition
ofPullDownButton
is nowunder
since this behaviour is the most frequent across iOS system apps. - Rework the way menus are rendered on screen (position and size) and added new position mode
automatic
(#5):over
- will attempt to fill as much space as possible.under
- is forced to be under an anchor. If there is no available space, will be placed above an anchor.above
- is forced to be above an anchor. If there is no available space, will be placed under an anchor.automatic
- is positioned under or above an anchor depending on side that has more space available.
- Fix issue where it was not possible to open pull-down menu when no items where provided to
PullDownMenuDivider.wrapWithDivider
.
- Add
onHoverTextStyle
toPullDownButtonTheme
(#6).
- Add support for mouse pointers for
PullDownMenuItem
. - Add
onHoverColor
toPullDownButtonTheme
(#6).
- Add ability to choose to whether apply opacity on menu open for
PullDownButton.buttonBuilder
or not (#4).
- Add
PullDownMenuWidthConfiguration
to allow customizing pull-down menu's width (#3).
- Replace
SizedBox
withConstrainedBox
inPullDownMenuTitle
to allowPullDownMenuTitle
to have adaptive height. - Update
largeDividerColor
inPullDownButtonThemeDefaults
to more correct value. - Bump Flutter minimum supported version from beta 2.13.0-0 to 3.0.
- Add
iconColor
andiconWidget
parameters toPullDownMenuItem
andSelectablePullDownMenuItem
.
- Fix menu background color "jumping" during open animation.
- Fix
showDialog
(and other actions that change navigation stack) to work directly without any workarounds (#1):
Migration
Instead of
onTap: () async {
await Future<void>.delayed(const Duration(milliseconds: 1));
await showDialog<void>(
context: context,
builder: (context) => ...,
);
},
Now is possible to write it like this:
onTap: () => showDialog<void>(
context: context,
builder: (context) => ...,
),
- Add
PullDownButtonInheritedTheme
as an additional way of defining globalPullDownButtonTheme
(#2).
- Update pull-down menu show/hide animations to be more similar to native version.
- Improve pull-down menu positioning on screen.
- Add shadow behind pull-down menu.
- Fix pull-down menu animating from the top instead of bottom for
PullDownMenuPosition.above
.