hideToolbar method

  1. @override
void hideToolbar(
  1. [bool hideHandles = true]
)
override

Hides the text selection toolbar.

By default, hideHandles is true, and the toolbar is hidden along with its handles. If hideHandles is set to false, then the toolbar will be hidden but the handles will remain.

Implementation

@override
void hideToolbar([bool hideHandles = true]) {
  if (hideHandles) {
    // Hide the handles and the toolbar.
    _selectionOverlay?.hide();
  } else if (_selectionOverlay?.toolbarIsVisible ?? false) {
    // Hide only the toolbar but not the handles.
    _selectionOverlay?.hideToolbar();
  }
}