handlePaste method

  1. @Deprecated('Use `contextMenuBuilder` instead. ' 'This feature was deprecated after v3.3.0-0.5.pre.')
Future<void> handlePaste(
  1. TextSelectionDelegate delegate
)

Call TextSelectionDelegate.pasteText to paste text.

This is called by subclasses when their paste affordance is activated by the user.

This function is asynchronous since interacting with the clipboard is asynchronous. Race conditions may exist with this API as currently implemented.

Implementation

// TODO(ianh): https://github.com/flutter/flutter/issues/11427
@Deprecated(
  'Use `contextMenuBuilder` instead. '
  'This feature was deprecated after v3.3.0-0.5.pre.',
)
Future<void> handlePaste(TextSelectionDelegate delegate) async {
  delegate.pasteText(SelectionChangedCause.toolbar);
}