platform_adaptive_widgets 3.1.0
platform_adaptive_widgets: ^3.1.0 copied to clipboard
A spiritual continuation of flutter_platform_widgets library
3.0.0 - 2026-11-04 #
Widgets now pair by the job they do, not the nearest look-alike, so each platform gets what the HIG or M3 asks for. Many old APIs are gone. Removed mentions the ones to now use
Added #
- [#52]
PlatformProgressBar(value:): determinate bar, both looks - [#61]
designLanguage, to match your own code to the widgets - [#57] Menu picker: own page past 250 items on Cupertino
- [#58]
showPlatformConfirm, Cancel included, styled byPlatformActionKind - [#48]
showPlatformChoices: action sheet on iOS, sheet of rows on Android - [#49]
PlatformActionsMenu: pull-down on iOS, M3 menu on Android, confirms destructive items - [#55]
PlatformButton.actionKind: delete and discard in red - [#55]
PlatformButton.iconOnly, its label the tooltip and screen-reader name - [#55]
PlatformBarAction:PlatformAppBar.actionsandprimaryAction, each look's own bar buttons - [#47]
showPlatformSheet: content or a short task in a sheet, iOS's sheet or M3's bottom sheet - [#47]
PlatformUnsavedChanges: closing a sheet with unsaved changes asks first - [#47]
useSafeAreakeeps a body that doesn't scroll clear of the bars:PlatformScaffold,showPlatformSheet,showPlatformFullscreenDialog - [#53]
PlatformMultiSelectList: checkmark rows on iOS, checkboxes on Android - [#54]
PlatformSingleSelectList: checkmark rows on iOS, radios on Android - [#45] Date picker: Material day and weekday builders
- [#82] Select lists:
isEnabled, andwidgetKeyon the list - [#82]
PlatformProgressBar.height, both looks - [#82]
PlatformTextField.enableInlinePrediction
Changed #
- [#46] Full-screen dialog: slide-up page on iOS, edge to edge on Android
- BREAKING [#46]
showPlatformFullscreenDialogtakes the page's bar + bodybuilder.backgroundColorflat,anchorPointintoMaterialFullscreenDialogData - [#51] Toast action on iOS too, waits for a tap
- [#52]
PlatformProgressIndicator: spinner only, read by VoiceOver - BREAKING [#52]
value,semanticsLabel,semanticsValueout ofMaterialProgressIndicatorData, label flat on the widget - [#61] Renders on every platform: Cupertino on iOS and macOS, Material elsewhere (used to throw)
- [#61]
buildMaterial/buildCupertinono longer callable from outside - [#57] Menu picker's wheel reports each stop, follows the app's value
- [#57] Menu picker ignores re-picking the current value
- BREAKING [#58]
MaterialAlertDialogData.actionsOverflowDirectionnon-null, defaultup - BREAKING [#48] Modal bottom sheets: flat
barrierDismissibleandbarrierColor - BREAKING [#55]
PlatformButtonneedsemphasis: ranks the same on both looks - BREAKING [#55]
PlatformAppBar.leadingper look, inMaterialAppBarData/CupertinoNavigationBarData - BREAKING [#55]
showPlatformFullscreenDialog's bar is anappBarBuilder, given the dialog's context - BREAKING [#47]
PlatformAppBarin a sheet shows the sheet's close X or Cancel - BREAKING [#69]
PlatformMenuPicker.items,PlatformSegmentButton.choices: aSet, so options can't repeat - [#73] A field left out sends upstream's own default, so a plain widget acts like the one it wraps
- [#73]
centerTitle,titleAlignmentand the text field's cursor default tonull: the theme and platform decide (Material) - [#73] Sheets and choices open on the nearest navigator (Material)
- [#73] Left-out
clipBehaviorno longer clips a style's builder, left-outenableFeedbackignoresListTileTheme(Material) - BREAKING [#73]
*Datarecords can't benull: each defaults to its empty record - BREAKING [#73] Pickers'
barrierDismissibleis abool, sheets' and choices'useRootNavigatorabool? - BREAKING [#45] Pickers'
requestFocusmoved toCupertinoDatePickerData - BREAKING [#82]
disabledChildrenflat onPlatformSegmentButton, disables on Android too.CupertinoSegmentButtonDataloses it and its<T>,kDefaultCupertinoSegmentButtonDisabledChildreniskDefaultPlatformSegmentButtonDisabledChildren - [#84] Delete and discard in M3's error colours: buttons, confirm, choices, actions menu (Material)
Fixed #
- [#56] Menu picker: same behaviour on both looks
- [#49] Menu picker keeps its checkmark at accessibility text sizes (Cupertino)
- [#49] Untitled alert: M3's top padding (Material)
- [#47] Text field draws its rounded border (Cupertino)
- [#71] VoiceOver reads disabled widgets as dimmed, buttons offer no dead tap (Cupertino)
- [#69] Open menu picker follows the app's new items, an open menu stays open past 5 (Cupertino)
- [#69] Segment button asserts on 1 choice or a selection outside them (Material)
- [#73] Text field and search bar: copy and paste menu and autofill
- [#73] Bar hairline, gray placeholder, date and time pickers close on a tap outside (Cupertino)
- [#73] Expansion tile chevron, button role on low buttons and tappable tiles, full-screen dialog clears the keyboard at once (Material)
- [#82] Menu picker puts
widgetKeyon the picker it builds
Removed #
- BREAKING [#51]
MaterialToastData.action,.persist,PlatformToastClosedReason: use flataction - BREAKING [#61]
isAndroid,isIOS: usedesignLanguageordefaultTargetPlatform - BREAKING [#58]
showPlatformAlertDialog,PlatformDialogAction: useshowPlatformConfirmorshowPlatformAcknowledge - BREAKING [#46]
showPlatformFullscreenDialog'smaterialBuilder,cupertinoBuilder,barrier*, andMaterialFullscreenDialogData.useSafeArea - BREAKING [#48]
MaterialModalBottomSheetData.isDismissible,CupertinoModalPopupData.barrierColor/.barrierDismissible, their 3kDefault*constants - BREAKING [#55]
MaterialButtonVariant,CupertinoButtonVariant: usePlatformButton.emphasis - BREAKING [#55]
PlatformButton.icon'siconAlignment: the icon leads on both looks - BREAKING [#47]
showPlatformDialog,MaterialDialogData: useshowPlatformSheet, orshowPlatformRawDialogfor your own surface - BREAKING [#50]
showPlatformModalBottomSheet: useshowPlatformSheet, orshowPlatformRawModalBottomSheetfor your own surface - BREAKING [#53]
PlatformCheckbox,MaterialCheckboxData,CupertinoCheckboxData: usePlatformMultiSelectList - BREAKING [#54]
PlatformRadio,PlatformRadioGroupBuilder,MaterialRadioData,CupertinoRadioData: usePlatformSingleSelectList - BREAKING [#73]
MaterialListTileData.internalAddSemanticForOnTap, a flag Flutter calls temporary - BREAKING [#73]
kDefaultListTileTitleAlignment,kDefaultListTileInternalAddSemanticForOnTap,kDefaultMaterialAlertDialogActionsOverflowDirection,kDefaultCupertinoListTileIsNotched,kDefaultCupertinoMenuPickerUseIconButtonVariant,CupertinoNavigationBarData.kLargeand the 7kDefaultCupertinoToast*: their values sit in the signatures
2.1.2 - 2026-08-15 #
Changed #
- Upgrade to Flutter 3.47 / Dart 3.13
- Bump material_ui + cupertino_ui bumped to ^1.0.0
2.1.1 - 2026-07-23 #
2.1.0 - 2026-06-09 #
2.0.0 - 2026-06-06 #
Added #
- PlatformToast (showPlatformToast): a transient, self-dismissing message - Material SnackBar on Android and a custom HUD-style banner on iOS; configured via MaterialToastData / CupertinoToastData
- PlatformAcknowledge (showPlatformAcknowledge): a must-acknowledge single-OK alert built on showPlatformAlertDialog
- showPlatformFullscreenDialog (with MaterialFullscreenDialogData): split out of showPlatformDialog; wraps content in Dialog.fullscreen and exposes only the fullscreen-valid Material knobs
- PlatformModalBottomSheet is now configurable via MaterialModalBottomSheetData / CupertinoModalPopupData, with per-platform materialBuilder / cupertinoBuilder
- PlatformButton.icon constructor and the MaterialButtonVariant.tonal variant (FilledButton.tonal)
- PlatformRadioGroupBuilder: a convenience widget bundling RadioGroup with a Wrap layout
- New per-platform fields: MaterialAppBarData.automaticallyImplyActions, CupertinoNavigationBarData.large, MaterialScaffoldData.bottomNavigationBar, MaterialSliderData.showValueIndicator, MaterialExpansionTileData.statesController, a new CupertinoSliderData, and the widget-level PlatformListTile.isEnabled
Changed #
- [#4] Debloated widget params across the package: shared functional params (value, callbacks, content slots, focusNode, autofocus, enabled, controller) are now flat params directly on each PlatformXxx widget, and the MaterialXxxData / CupertinoXxxData classes are slimmed to platform-only overrides. The enabled flag is renamed isEnabled; primary callbacks (onPressed / onChanged / onSelectionChanged) are now required and non-null (disable via isEnabled instead of a null callback); the per-Data widgetKey is dropped in favor of the widget-level widgetKey
- showPlatformDialog: dropped PlatformDialogData and the per-platform Material flat knobs (now on MaterialDialogData); added flat anchorPoint / barrierColor / barrierDismissible / barrierLabel / routeSettings / useRootNavigator / requestFocus; fullscreen moved to the new showPlatformFullscreenDialog
- showPlatformAlertDialog: removed the data-object params; renamed key to widgetKey; actions is now non-null (defaults to an empty list); added the flat barrier / route args
- PlatformMenuPicker: MaterialMenuPickerData and CupertinoMenuPickerData no longer take leadingIcon or labelText - set them on the widget instead
- showPlatformModalBottomSheet: builder is now optional, with materialBuilder / cupertinoBuilder for per-platform content (mutually exclusive with builder); added routeSettings / useRootNavigator / anchorPoint / requestFocus
- PlatformButton: child is now positional and onPressed is required; mouseCursor moved to CupertinoButtonData / Material style; MaterialButtonData no longer carries icon / label / iconAlignment (use PlatformButton.icon)
- PlatformTextField: shared text-field params are now flat on the widget (the PlatformTextFieldData base class is gone); added flat hintText / prefix / suffix
- PlatformSegmentButton: the selection param is now the public selectedChoice; choices / segmentBuilder / onSelectionChanged are required and non-null; MaterialSegmentButtonData is no longer generic
- PlatformExpansionTile: title and child are required and non-null; MaterialExpansionTileData no longer accepts children (single-child only - wrap multiple in a Column)
- PlatformListTile: title is now required and non-null; the common slots moved from the per-platform data classes onto the widget
- PlatformApp: the AppData hierarchy is flattened onto PlatformApp / PlatformApp.router (app-level params such as title, locale, localizationsDelegates, builder and routing); materialAppData / cupertinoAppData now hold only platform-specific fields
- PlatformTabScaffold: redesigned - tabDestinations and selectedIndex are now required and non-null; MaterialTabScaffoldData is a thin MaterialScaffoldData subclass with its tab fields removed
- Example app rebuilt as an interactive, platform-switching widget showcase
Fixed #
- showPlatformDialog: the centered-only Material knobs (alignment, shape, clipBehavior, constraints, elevation, insetPadding, shadowColor, surfaceTintColor) are no longer silently dropped when shown fullscreen - they now live on MaterialDialogData under showPlatformDialog
- PlatformMenuPicker (iOS wheel): the modal picker now opens highlighted on the current selection instead of always the first item
- PlatformSearchBar (Cupertino): default itemColor changed from placeholderText to secondaryLabel and default padding to EdgeInsets.symmetric(horizontal: 5.5, vertical: 8), matching upstream CupertinoSearchTextField
- PlatformButton: the tonal and tonalIcon variants are now supported, and the Cupertino filled / tinted variants honor isEnabled
- PlatformDialogAction: a null onPressed now genuinely disables the action on both platforms instead of wiring an always-present no-op
- PlatformExpansionTile (Material): expanded-alignment and feedback defaults now defer to the Material theme instead of being hard-coded
Removed #
- PlatformSimpleAlert (showPlatformSimpleAlert): split into showPlatformToast (its SnackBar half) and showPlatformAcknowledge (its alert half)
- PlatformRadioGroup and PlatformRadioGroupData: replaced by PlatformRadio (a single leaf radio that requires an ancestor RadioGroup) plus PlatformRadioGroupBuilder; the PlatformRadioData base class and the ValueAndButton typedef are also removed
- PlatformAlertDialogActionButton: renamed to PlatformDialogAction
- The shared cross-platform data base classes PlatformDialogData, PlatformTextFieldData, PlatformSearchBarData, PlatformCheckboxData, PlatformSwitchData and PlatformSliderData (their fields are now flat on the widgets)
- AppData, PlatformAppRouterData, MaterialAppRouterData and CupertinoAppRouterData, along with PlatformApp.appData and the router-data params - flattened onto PlatformApp
- CupertinoTabScaffoldData and PlatformTabScaffold.cupertinoTabScaffoldData; the tab fields on MaterialTabScaffoldData; MaterialListTileData.enabled (now PlatformListTile.isEnabled); and MaterialProgressIndicatorData.key
- All per-class kDefault static-const members - replaced by top-level kDefault-prefixed constants (e.g. MaterialAlertDialogData.kDefaultScrollable is now kDefaultMaterialAlertDialogScrollable)
1.1.0 - 2026-05-31 #
1.0.5 - 2026-03-03 #
1.0.4 - 2026-02-26 #
Removed #
- CupertinoTabController from PlatformTabScaffold data. This causes issues with an external tab-management solution like GoRouter
1.0.3 - 2026-02-26 #
Fixed #
- [iOS] navigation shell not switching when rebuilt with a different index
1.0.2 - 2026-02-20 #
Fixed #
- common-level specification do not override platform-level specs for PlatformApp
1.0.0 - 2026-02-19 #
Added #
- usage with GoRouter example
Changed #
- rename TabDestinationData -> TabDestination
- Material side of PlatformTabScaffold also handles the caching internally, preventing rebuilds when switching tabs
Fixed #
- router type not detected if not giving in specific data
- state holding by PlatformTabScaffold
- maxLines > minLines assertion error when data empty
Removed #
- PlatformTabController for simplicity
- PlatformTabScaffoldOriginal impl
0.1.0 - 2026-02-17 #
Added #
- Date picker
- Time picker
- Menu picker
- A lot of new widgets (see README.md for the catalog)
- example catalog
- Documentation
- Platform Adaptive Icons legacy class
- New options to configure PlatformMenuPicker's items
- Platform check utilities
Changed #
- Much better Readme
Fixed #
- exception when something other than base child is used in platform button
Removed #
denseoption for any data. Full compliance with M3 atleast
0.0.1 - 2026-01-03 #
Added #
- Platform progress indicator
- Platform list tile
- Platform theme
- Platform context extensions (value, valueLazy, nullable)
- Platform checkbox
- Platform expansion list tile
- Platform radio group
- Platform search bar
- Platform segment button
- Platform slider
- Platform switch
- Platform scrollbar
- Platform text-field
