expressiveContextMenu function
A field's context menu: Material's default (the platform's own menu where the field supports it, else the adaptive toolbar), under the words it reads.
The menu stands in the root overlay and captures its themes from there,
so it never sees an ExpressiveTheme mounted under the app's home, nor
the words that theme supplies: it supplies them itself.
Implementation
Widget expressiveContextMenu(
BuildContext context,
EditableTextState editableTextState,
) {
if (SystemContextMenu.isSupportedByField(editableTextState)) {
return SystemContextMenu.editableText(editableTextState: editableTextState);
}
return withPlatformWords(
context,
AdaptiveTextSelectionToolbar.editableText(
editableTextState: editableTextState,
),
);
}