popover 0.5.1
popover: ^0.5.1 copied to clipboard
A popover is a transient view that appears above other content onscreen when you tap a control or in an area.
0.5.1 12.10.2026 #
- Text between the grays
Color(0xFF858585)andColor(0xFF9D9D9D)in luminance, such as#8E8E93,#999999or the iOS system blue#0A84FF, now gets the dark background by default instead of the light one. The switch moved from a luminance of 0.34 to 0.23, where the text has the same contrast against both backgrounds.#999999text was 2.9:1 on the white triangle and is 4.9:1 on the dark one.
0.5.0 12.10.2026 #
- Breaking: the minimum versions are Flutter 3.47.0 and Dart 3.13.0, up from Flutter 3.35.0 and Dart 3.9.0.
- Breaking: the look of a popover moved into
PopoverStyle, passed asstyle:toshowPopoverandPopover:arrowStyle,backgroundColor,brightness,barrierColor,radius,shadow,arrowWidth,arrowHeight,transitionandtransitionDuration. The newPopoverThemesets a style for a whole subtree, and the style at the call wins over it.showPopoverno longer takeskeyor the deprecatedisParentAlive.PopoverTransitionBuilder, the type ofpopoverTransitionBuilder, is now exported. The README has a before and after. - Breaking: the popover depends only on
package:flutter/widgets.dartand works withpackage:flutter/material.dart,package:flutter/cupertino.dart,package:material_uiandpackage:cupertino_ui. 0.4.0 threwNo MaterialLocalizations foundin aCupertinoApp(#113).(thanks @livtanong).- The body is no longer wrapped in a
Material. Wrap it in theMaterialof your UI library if it contains Material widgets that require one, such asInkWell,ListTile,TextField,CheckboxorSwitch, withMaterialType.transparencyso the glass background shows. barrierLabeldefaults to'Dismiss'instead ofMaterialLocalizations.modalBarrierDismissLabel. Pass a localized label if you need one.- Inherited themes (
Theme,DefaultTextStyle,IconThemeand others) are captured from the callingcontextand applied to the body. The body text and icon styles are the ones in effect atcontext: theAppBarforeground color when opened from anAppBaraction, andMaterialApp's red debug text without aMaterialancestor. AMaterialaround the body resets the text totextTheme.bodyMedium. - A translucent
backgroundColoris painted once under the body instead of twice, so the body looks more transparent than before.
- The body is no longer wrapped in a
- Breaking: the popover is placed the way iOS, iPadOS and macOS place theirs. The rules come from
UIPopoverPresentationControllerandNSPopovermeasured on iOS 26 simulators and macOS 26.- It stays inside the safe area and above the keyboard. The margin is 10 on iPhone, Android, web, Windows and Linux. On iPad it is 19 at the sides, 30 at the top and 10 at the bottom, and on macOS 13.
- When the body fits on neither the preferred side nor the opposite one, it takes the side with more room and shrinks to fit, so a scrollable body scrolls. On macOS it first tries the two perpendicular sides, like
NSPopover. - Outside macOS, a popover on the left or the right may cover the anchor up to its center, as UIKit does.
width,heightandconstraintsare capped by the space available.- The popover follows its anchor when the anchor moves, scrolls or the screen rotates, as UIKit does for a source view. When the anchor leaves the tree while the popover is open, for example in a lazy list, the popover stays where the anchor was last seen.
- An anchor partly or fully off screen is moved onto the screen edge first. UIKit does this below the bottom edge and beside the side edges but lets an anchor above the top edge push the popover off screen. The popover clamps on every edge.
- The
trianglearrow stops short of the rounded corners. Theapplearrow merges into a nearby corner, as UIKit and AppKit do. - Flutter web follows the rules of the host OS, so it uses the macOS rules on a Mac.
- Breaking: on iOS, iPadOS and macOS the popover has the native shape by default. The new
arrowStylestyle field takesPopoverArrowStyle.apple,triangleoradaptive, the default, which isappleon Apple platforms andtriangleelsewhere. Flutter web follows the host OS here too, so Safari on a Mac or an iPhone gets theappleshape.- On iOS the
appleoutline repeats the mask path ofUIPopoverPresentationControlleron iOS 26 element for element: continuous corners with a 34 point radius, a 26 by 13 arrow with a rounded tip and filleted sides, and the corner next to the arrow merging into it. A test compares it with 31 paths dumped from a simulator. Its default shadow,BoxShadow(color: Color(0x6B000000), blurRadius: 210), matches the iOS shadow within one level of brightness. - On macOS it repeats the
NSPopoveroutline of macOS 26: 20 point corners, a 25.42 by 13 arrow with an arc for a tip, and AppKit's blend of the arrow into a nearby corner. A test compares it with 171 paths dumped from macOS. The default shadow,BoxShadow(color: Color(0x40000000), blurRadius: 12, offset: Offset(0, 3.6)), is fitted to a screenshot ofNSPopover. arrowWidth,arrowHeight,radiusandshadoware now nullable and default per style. SetPopoverStyle(arrowStyle: PopoverArrowStyle.triangle)for the previous look.
- On iOS the
- Breaking: with the
appleshape the default background is the Liquid Glass of iOS 26 and macOS 26, a blur of the content behind with a tint and a light rim, fitted to native popovers captured over 22 backgrounds in light and dark mode.backgroundColoris now nullable, and a color passed in replaces the glass. Thetriangledefault stays white, orColor(0xFF2C2C2E)in dark mode.- The new
brightnessstyle field picks light or dark. By default the background contrasts with the text color the body inherits fromcontext, so an app that forces a light theme on a phone in dark mode gets a light popover. Without an inherited text color it follows the system setting. barrierColoris now nullable. It defaults to transparent for theappleshape, since iOS and macOS do not dim the screen behind a popover, and toColor(0x80000000)for thetriangle.
- The new
- Fixed: the popover flipped and slid against the size of the first window, not the screen it is shown in. Near the right edge it could open off screen.
- Fixed: a flipped popover drew its shadow with the arrow on the original side.
- Fixed: with more than one
BoxShadowinshadow, every shadow after the first was shifted by the popover's position again. - With the
appleshape on iOS the popover opens and closes like an iOS 26 popover: it scales up from the arrow tip while its outline grows from 100 points to its full height, then shrinks back. The springs, 494 ms to open and 516 ms to close, are read from theCASpringAnimationobjects UIKit attaches to a popover. On macOS it scales up from the tip and fades in on a spring over 440 ms and shrinks back over 200 ms, fitted to a recording ofNSPopover.transitionDurationis now nullable, and a duration passed in applies to both directions. - Added a package skill,
skills/popover-usage/SKILL.md, whichdart run skills@ getinstalls for coding agents, and pub.dev topics. - Added the
Popoverwidget andPopoverController, which keep a popover in the widget tree with its anchor aschild.show,hideandtoggleopen and close it, and the controller follows when the user closes it. - Added
semanticsLabel, which names the popover for screen readers. Tests now cover Esc closing the popover, Tab staying inside it, focus going back to where it was, and screen readers seeing only the popover and its barrier. - Added a
Mutation TestCI workflow overlib/that fails below the 75% threshold inmutation_test.xml. It runs in parallel shards and, on a pull request, mutates only the changed declarations. - Added golden tests, rendered on Linux, and an
E2ECI workflow that runs the example's integration test on iPhone, iPad, macOS, Windows and Linux, in Chrome and on an Android emulator, with screenshots and rotation. - Rebuilt the example app with a Roadmap tab, an issue list with a Share menu, and a Playground tab with a direction switcher. The
E2Eworkflow renders a demo image of the example on every platform.
0.4.0 23.10.2025 #
- Fixed memory leak by disposing CurvedAnimation in FadeTransitionWidget (#105, #106).(thanks @ZacharyYongBB).
- Added ability to click on widgets behind the barrier (#101).(thanks @mcquenji).
- Updated minimum Flutter and Dart versions to 3.35.0+ and 3.9.0+ respectively.
0.3.1 10.00.2024 #
- Update minimum Flutter and Dart versions to 3.24.0+ and 3.5.0+ respectively.
0.3.0+1 19.05.2024 #
- Update README.
- Update web example to use flutter.js service worker bootstrapping.
0.3.0 08.02.2024 #
- Fixed Half of the widget is not shown. (thanks @zwett).
0.2.9 08.12.2023 #
- Added
contentDxOffset. (thanks @kasyanyukd1995).
0.2.8+2 01.03.2023 #
0.2.8+1 05.02.2023 #
0.2.8 02.01.2023 #
- BREAKING: Improve popover rendering.
isParentAliveparameter was deprecated. (thanks @VictorOhashi).
0.2.7 23.10.2022 #
- Add
popoverTransitionBuilder. Users can provide custom animation transition now. (thanks @sanjidbillah).
0.2.6+3 12.10.2021 #
- Fixed the bug that appears when the parent widget from which
Popoverwas presented has been removed from a widget tree (thanks @ajaxspace).
0.2.6+2 17.06.2021 #
- Fixed the bug that appears when you change window size while popover is opened (thanks @whitebug).
0.2.6+1 21.05.2021 #
- Set minimum dart version to 2.12.0.
0.2.6 21.05.2021 #
- Fix constraints size for
PopoverDirection.top&PopoverDirection.bottom.
0.2.5 18.05.2021 #
- Recalculate popover shape on context changes.
0.2.4 17.05.2021 #
- Parameters
arrowDyOffset,arrowDxOffsetandcontentDyOffsetnow can be apply again. - Fix Popover breaks when opened to the right.
- Update example.
0.2.3 03.05.2021. #
- Add
RouteSettings? routeSettingsparameter.
0.2.2 22.04.2021. #
- Rebuild Popover on device orientation changes (thanks @SanekLic, @shcherbuk96).
0.2.1 04.04.2021. #
- Lower minimum version requirements for Dart and Flutter to pass pub.dev validation.
0.2.0 04.04.2021. #
- Migrate to NNBD.
0.1.0 09.02.2021. #
- BREAKING: Refactor popover implementation to have identical API to included in Flutter modal dialogs e.g.
showCupertinoDialog - docs: README updates
- docs: example application updates
0.0.5 08.02.2021. #
- Add
Key key,barrierDismissibleandshowPopover.
0.0.4 27.01.2021. #
- Add
arrowDyOffset,arrowDxOffsetandcontentDyOffsetpublic parameters.
0.0.3 21.01.2021. #
- A
childwidget can be wrapped inInkWellorGestureDetector.
0.0.2 18.01.2021. #
- Update
PopoverItem. - Add
PopoverDirectionto exports. - Add documentation.
0.0.1 10.01.2021. #
- Initial release.
