buildEditableTextContextMenu function
Widget
buildEditableTextContextMenu(
- BuildContext innerContext,
- EditableTextState editableTextState, [
- UndoHistoryController? undoHistoryController
Implementation
Widget buildEditableTextContextMenu(
BuildContext innerContext, EditableTextState editableTextState,
[UndoHistoryController? undoHistoryController]) {
TargetPlatform platform = Theme.of(innerContext).platform;
switch (platform) {
case TargetPlatform.android:
case TargetPlatform.iOS:
return MobileEditableTextContextMenu(
anchorContext: innerContext,
editableTextState: editableTextState,
undoHistoryController: undoHistoryController,
);
case TargetPlatform.macOS:
case TargetPlatform.windows:
case TargetPlatform.linux:
case TargetPlatform.fuchsia:
return DesktopEditableTextContextMenu(
anchorContext: innerContext,
editableTextState: editableTextState,
undoHistoryController: undoHistoryController,
);
}
}