Description of change

Context menus are now built from the contextMenuBuilder parameter, which has
been added to all text-editing and text-selection widgets. If one is not
provided, then Flutter just sets it to a default that builds the correct context
menu for the given platform. All of these default widgets are exposed to users
for re-use. Customizing context menus now consists of using contextMenuBuilder
to return whatever widget you want, possibly including reusing the built-in
context menu widgets.

Here’s an example that shows how to add a Send email button to the default
context menus whenever an email address is selected. The full code can be found
in the samples repository in
email_button_page.dart
on GitHub.

TextField

contextMenuBuilder:

context

editableTextState

final

TextEditingValue

value

editableTextState

textEditingValue