`SystemContextMenuController.show` is deprecated. The same functionality can be achieved by passing the result of calling `SystemContextMenu.getDefaultItems` to `SystemContextMenuController.showWithItems`.
- Who is affected
- Code that still calls the deprecated API; it keeps working until removal but produces analyzer warnings. Code that uses SystemContextMenuController.show, SystemContextMenu.getDefaultItems, SystemContextMenuController.showWithItems and related APIs.
- Practical impact
- Warnings now; removal in a future release. Plan the migration but no immediate break.
- What action should I take?
- Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Before and after (from the official guide)
| 1 | − | _controller.show(selectionRect); |
| 1 | + | final List<IOSSystemContextMenuItem> defaultItems = |
| 2 | + | SystemContextMenu.getDefaultItems(editableTextState); |
| 3 | + | final WidgetsLocalizations localizations = |
| 4 | + | WidgetsLocalizations.of(context); |
| 5 | + | final List<IOSSystemContextMenuItemData> defaultItemData = |
| 6 | + | defaultItems |
| 7 | + | .map((IOSSystemContextMenuItem item) => |
| 8 | + | item.getData(localizations)) |
| 9 | + | .toList(); |
| 10 | + | _controller.showWithItems(selectionRect, defaultItemData); |
Raw before / after
_controller.show(selectionRect);
final List<IOSSystemContextMenuItem> defaultItems =
SystemContextMenu.getDefaultItems(editableTextState);
final WidgetsLocalizations localizations =
WidgetsLocalizations.of(context);
final List<IOSSystemContextMenuItemData> defaultItemData =
defaultItems
.map((IOSSystemContextMenuItem item) =>
item.getData(localizations))
.toList();
_controller.showWithItems(selectionRect, defaultItemData);Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)
Most users use the system context menu through the SystemContextMenu widget,
and in this case there will be no change required. The SystemContextMenu
widget automatically gets the default items under the hood.
No migration is needed:
class _MyWidgetState extends State<MyWidget> {
@override
Widget build(BuildContext context) {
TextField(
contextMenuBuilder: (BuildContext context, EditableTextState editableTextState) {
return SystemContextMenu.editableText(
editableTextState: editableTextState,
);
}
);
}
}For advanced users that directly work with SystemContextMenuController,
migrate to the new method SystemContextMenuController.showWithItems. The
default can be obtained from SystemContextMenu.getDefaultItems as a list of
IOSSystemContextMenuItems, which can be converted to the format required by
showWithItems through IOSSystemContextMenuItem.getData.
Code before migration:
_controller.show(selectionRect);Code after migration:
final List<IOSSystemContextMenuItem> defaultItems =
SystemContextMenu.getDefaultItems(editableTextState);
final WidgetsLocalizations localizations =
WidgetsLocalizations.of(context);
final List<IOSSystemContextMenuItemData> defaultItemData =
defaultItems
.map((IOSSystemContextMenuItem item) =>
item.getData(localizations))
.toList();
_controller.showWithItems(selectionRect, defaultItemData);AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.Listed in the official breaking-changes index; title states deprecation.
An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.
- Official migration guide
- TextInputConnection
- SystemContextMenuController.show
- SystemContextMenuController.showWithItems
- SystemContextMenu
- Flutter should support iOS 15's Secure Paste feature
- Secure paste milestone 2
- ios secure_paste show menu item based on info sent from framework
- Native ios context menu
- ios_edit_menu add native edit menu
- Source commit
- b3045439b7c0
- Source last updated
- Oct 21, 2026
- Last synchronized
- Oct 21, 2026
- Publication status
- published
Publication history
- Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.