ExtendedTextSelectionOverlay constructor

ExtendedTextSelectionOverlay({
  1. required TextEditingValue value,
  2. required BuildContext context,
  3. Widget? debugRequiredFor,
  4. required LayerLink toolbarLayerLink,
  5. required LayerLink startHandleLayerLink,
  6. required LayerLink endHandleLayerLink,
  7. required ExtendedTextSelectionRenderObject renderObject,
  8. TextSelectionControls? selectionControls,
  9. bool handlesVisible = false,
  10. TextSelectionDelegate? selectionDelegate,
  11. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  12. VoidCallback? onSelectionHandleTapped,
  13. ClipboardStatusNotifier? clipboardStatus,
})

Creates an object that manages overly entries for selection handles.

The context must not be null and must have an Overlay as an ancestor.

Implementation

ExtendedTextSelectionOverlay({
  required TextEditingValue value,
  required this.context,
  this.debugRequiredFor,
  required this.toolbarLayerLink,
  required this.startHandleLayerLink,
  required this.endHandleLayerLink,
  required this.renderObject,
  this.selectionControls,
  bool handlesVisible = false,
  this.selectionDelegate,
  this.dragStartBehavior = DragStartBehavior.start,
  this.onSelectionHandleTapped,
  this.clipboardStatus,
})  : _handlesVisible = handlesVisible,
      _value = value {
  final OverlayState? overlay = Overlay.of(context, rootOverlay: true)!;
  assert(
      overlay != null,
      'No Overlay widget exists above $context.\n'
      'Usually the Navigator created by WidgetsApp provides the overlay. Perhaps your '
      'app content was created above the Navigator with the WidgetsApp builder parameter.');
  _toolbarController =
      AnimationController(duration: fadeDuration, vsync: overlay!);
}