Conversation
…select Marks the current choice in a single-selection menu: - iOS 14+ native menus set `UIAction.state = .on` (system trailing checkmark) - Material popup menus and the iOS <26 action-sheet fallback show a checkmark The flag is plumbed through the iOS platform view (creation params + `updateMenuItems`) and included in change detection so toggling selection updates the live menu. Co-authored-by: Cursor <cursoragent@cursor.com>
…ding
IOS26Button forced SizedBox(width: minSize.width) — callers passing
Size(0, h) ('no min width', Cupertino semantics, and what the shared
_wrapIOSButton ConstrainedBox does) got a zero-width invisible button
on iOS 26. Child mode now sizes to its Flutter-drawn child with
ConstrainedBox min constraints, and applies [padding] around the child
so the glass pill extends past the label. Title mode keeps the explicit
size since the native label has no Flutter intrinsic width.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gem85247
added a commit
to gem85247/adaptive_platform_ui
that referenced
this pull request
Aug 19, 2026
…S26Button child-mode fix)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
selectedflag toAdaptivePopupMenuItemso a popup menu can act as a single-select control and show which option is currently active — the piece missing for usingAdaptivePopupMenuButtonas a settings-style value picker.UIAction.state = .on, so the system renders its native trailing checkmark on the selected item.Icons.check,colorScheme.primary).CupertinoIcons.checkmark.The flag is plumbed through the iOS platform view (
creationParams+updateMenuItems), added to_hasMenuItemsChangedand the view key, so toggling selection updates the live menu. Defaults tofalse, so this is fully backward compatible.Why
Today there's no way to indicate the current value in a popup menu — you can only fake it by swapping an item's leading
iconto a checkmark, which fights the native leading-image layout and never produces the real iOS trailing checkmark.isDestructive/subtitle/imageBytesalready follow this same three-surface pattern;selectedfills the gap.Usage
Changes
AdaptivePopupMenuItem.selected(defaultfalse) + dartdocisSelected, applyUIAction.state0.1.112Test plan
selectedset) render unchangedMade with Cursor