ExtendedTextSelectionOverlay constructor
ExtendedTextSelectionOverlay({
- required TextEditingValue value,
- required BuildContext context,
- Widget? debugRequiredFor,
- required LayerLink toolbarLayerLink,
- required LayerLink startHandleLayerLink,
- required LayerLink endHandleLayerLink,
- required ExtendedTextSelectionRenderObject renderObject,
- TextSelectionControls? selectionControls,
- bool handlesVisible = false,
- TextSelectionDelegate? selectionDelegate,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- VoidCallback? onSelectionHandleTapped,
- 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!);
}