setOnCopyFromMenu method

  1. @override
void setOnCopyFromMenu(
  1. Future<bool> callback()?
)
override

Sets the callback to be invoked when the Copy menu item is selected.

The callback should return a Future that completes with true if the operation was handled, or false to allow the default system behavior.

Parameters:

  • callback: The callback to invoke, or null to clear the handler.

Implementation

@override
void setOnCopyFromMenu(Future<bool> Function()? callback) {
  _onCopy = callback;
}