hideToolbar method Null safety

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

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.


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