buildToolbar method Null safety
- BuildContext context,
- Rect globalEditableRegion,
- double textLineHeight,
- Offset selectionMidpoint,
- List<
TextSelectionPoint> endpoints, - TextSelectionDelegate delegate,
- ClipboardStatusNotifier? clipboardStatus,
- Offset? lastSecondaryTapDownPosition
override
Builder for iOS-style copy/paste text selection toolbar.
Implementation
@override
Widget buildToolbar(
BuildContext context,
Rect globalEditableRegion,
double textLineHeight,
Offset selectionMidpoint,
List<TextSelectionPoint> endpoints,
TextSelectionDelegate delegate,
ClipboardStatusNotifier? clipboardStatus,
Offset? lastSecondaryTapDownPosition,
) {
return _CupertinoTextSelectionControlsToolbar(
clipboardStatus: clipboardStatus,
endpoints: endpoints,
globalEditableRegion: globalEditableRegion,
handleCut: canCut(delegate) ? () => handleCut(delegate) : null,
handleCopy: canCopy(delegate) ? () => handleCopy(delegate) : null,
handlePaste: canPaste(delegate) ? () => handlePaste(delegate) : null,
handleSelectAll: canSelectAll(delegate) ? () => handleSelectAll(delegate) : null,
selectionMidpoint: selectionMidpoint,
textLineHeight: textLineHeight,
);
}