|
...
|
...
|
@@ -50,8 +50,8 @@ class MyTextSelectionControls extends TextSelectionControls { |
|
|
|
clipboardStatus: clipboardStatus,
|
|
|
|
handleCut: canCut(delegate) ? () => handleCut(delegate, null) : null,
|
|
|
|
handleCopy: canCopy(delegate) ? () => handleCopy(delegate) : null,
|
|
|
|
// handlePaste: () => handlePaste(delegate),
|
|
|
|
handlePaste: canPaste(delegate) ? () => handlePaste(delegate) : null,
|
|
|
|
handlePaste: () => null,
|
|
|
|
// handlePaste: canPaste(delegate) ? () => handlePaste(delegate) : null,
|
|
|
|
handleSelectAll:
|
|
|
|
canSelectAll(delegate) ? () => handleSelectAll(delegate) : null,
|
|
|
|
handleLike: () async {
|
|
...
|
...
|
@@ -92,12 +92,12 @@ class MyTextSelectionControls extends TextSelectionControls { |
|
|
|
BuildContext context, TextSelectionHandleType type, double textLineHeight,
|
|
|
|
[VoidCallback onTap, double startGlyphHeight, double endGlyphHeight]) {
|
|
|
|
final Widget handle = SizedBox(
|
|
|
|
// width: _kHandleSize,
|
|
|
|
// height: _kHandleSize,
|
|
|
|
// child: Image.asset(
|
|
|
|
// 'assets/add_store.png',
|
|
|
|
// ),
|
|
|
|
);
|
|
|
|
// width: _kHandleSize,
|
|
|
|
// height: _kHandleSize,
|
|
|
|
// child: Image.asset(
|
|
|
|
// 'assets/add_store.png',
|
|
|
|
// ),
|
|
|
|
);
|
|
|
|
|
|
|
|
// [handle] is a circle, with a rectangle in the top left quadrant of that
|
|
|
|
// circle (an onion pointing to 10:30). We rotate [handle] to point
|
|
...
|
...
|
@@ -286,15 +286,15 @@ class _TextSelectionControlsToolbarState |
|
|
|
),
|
|
|
|
if (widget.handlePaste != null &&
|
|
|
|
widget.clipboardStatus?.value == ClipboardStatus.pasteable)
|
|
|
|
_TextSelectionToolbarItemData(
|
|
|
|
label: localizations.pasteButtonLabel,
|
|
|
|
onPressed: widget.handlePaste,
|
|
|
|
),
|
|
|
|
if (widget.handleSelectAll != null)
|
|
|
|
_TextSelectionToolbarItemData(
|
|
|
|
label: localizations.selectAllButtonLabel,
|
|
|
|
onPressed: widget.handleSelectAll,
|
|
|
|
),
|
|
|
|
// _TextSelectionToolbarItemData(
|
|
|
|
// label: localizations.pasteButtonLabel,
|
|
|
|
// onPressed: widget.handlePaste,
|
|
|
|
// ),
|
|
|
|
if (widget.handleSelectAll != null)
|
|
|
|
_TextSelectionToolbarItemData(
|
|
|
|
label: localizations.selectAllButtonLabel,
|
|
|
|
onPressed: widget.handleSelectAll,
|
|
|
|
),
|
|
|
|
_TextSelectionToolbarItemData(
|
|
|
|
label: '粘贴',
|
|
|
|
onPressed: widget.handleLike,
|
...
|
...
|
|