buildToolbar method Null safety
- BuildContext context,
- Rect globalEditableRegion,
- double textLineHeight,
- Offset position,
- List<
TextSelectionPoint> endpoints, - TextSelectionDelegate delegate,
- ClipboardStatusNotifier? clipboardStatus,
- Offset? lastSecondaryTapDownPosition
Builds a toolbar near a text selection.
Typically displays buttons for copying and pasting text.
globalEditableRegion
is the TextField size of the global coordinate system
in logical pixels.
textLineHeight
is the preferredLineHeight
of the RenderEditable we
are building a toolbar for.
The position
is a general calculation midpoint parameter of the toolbar.
If you want more detailed position information, can use endpoints
to calculate it.
Implementation
Widget buildToolbar(
BuildContext context,
Rect globalEditableRegion,
double textLineHeight,
Offset position,
List<TextSelectionPoint> endpoints,
TextSelectionDelegate delegate,
// TODO(chunhtai): Change to ValueListenable<ClipboardStatus>? once
// mirgration is done. https://github.com/flutter/flutter/issues/99360
ClipboardStatusNotifier? clipboardStatus,
Offset? lastSecondaryTapDownPosition,
);