handleCopy method Null safety

void handleCopy(
  1. TextSelectionDelegate delegate,
  2. [ClipboardStatusNotifier? clipboardStatus]
)

Call TextSelectionDelegate.copySelection to copy current selection.

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

Implementation

// TODO(chunhtai): remove optional parameter once migration is done.
// https://github.com/flutter/flutter/issues/99360
void handleCopy(TextSelectionDelegate delegate, [ClipboardStatusNotifier? clipboardStatus]) {
  delegate.copySelection(SelectionChangedCause.toolbar);
}