showHandles method Null safety

void showHandles()

Builds the handles by inserting them into the context's overlay.

Implementation

void showHandles() {
  if (_handles != null)
    return;

  _handles = <OverlayEntry>[
    OverlayEntry(builder: (BuildContext context) => _buildHandle(context, _TextSelectionHandlePosition.start)),
    OverlayEntry(builder: (BuildContext context) => _buildHandle(context, _TextSelectionHandlePosition.end)),
  ];

  Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor)!
    .insertAll(_handles!);
}