),

),

);

},

);

return

AdaptiveTextSelectionToolbar

buttonItems

anchors:

editableTextState

contextMenuAnchors

buttonItems:

buttonItems

);

},

A full example of modifying a built-in context menu action can be found in the
samples repository in
modified_action_page.dart
on GitHub.

buildToolbar

This function generated the context menu widget similarly to
contextMenuBuilder, but required more setup to use. Before this change, you
might have been overriding buildToolbar as a part of TextSelectionControls,
like this:

// Deprecated.

class

_MyMaterialTextSelectionControls

extends

MaterialTextSelectionControls