buildToolbar method
- BuildContext context,
- Rect globalEditableRegion,
- double textLineHeight,
- Offset selectionMidpoint,
- List<
TextSelectionPoint> endpoints, - TextSelectionDelegate delegate,
- ValueListenable<
ClipboardStatus> ? clipboardStatus, - Offset? lastSecondaryTapDownPosition,
override
Builds a toolbar near a text selection.
Typically displays buttons for copying and pasting text.
The globalEditableRegion parameter is the TextField size of the global
coordinate system in logical pixels.
The textLineHeight parameter is the RenderEditable.preferredLineHeight
of the RenderEditable we are building a toolbar for.
The selectionMidpoint parameter is a general calculation midpoint
parameter of the toolbar. More detailed position information
is computable from the endpoints parameter.
Implementation
@override
Widget buildToolbar(
BuildContext context,
Rect globalEditableRegion,
double textLineHeight,
Offset selectionMidpoint,
List<TextSelectionPoint> endpoints,
TextSelectionDelegate delegate,
ValueListenable<ClipboardStatus>? clipboardStatus,
Offset? lastSecondaryTapDownPosition,
) {
// This method is just forwarding the call to an inner control
//
// Once this deprecated method is removed, the call to the inner control
// will be removed as well
// ignore: deprecated_member_use
return _controls.buildToolbar(
context,
globalEditableRegion,
textLineHeight,
selectionMidpoint,
endpoints,
delegate,
clipboardStatus,
lastSecondaryTapDownPosition,
);
}