Skip to content

Commit 59c9da4

Browse files
committed
chore: mark clipboard action buttons as experimental
1 parent 9539869 commit 59c9da4

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

doc/migration/10_to_11.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,5 +497,6 @@ in non-major releases:
497497
- The `shouldNotifyListeners` in `QuillController.replaceText()`, `QuillController.replaceText()`, `QuillController.formatSelection()`.
498498
- The `QuillController.clipboardSelection()`.
499499
- The `CopyCutServiceProvider`, `CopyCutService`, and `DefaultCopyCutService`.
500+
- The clipboard action buttons in the `QuillSimpleToolbar` (`showClipboardCut`, `showClipboardCopy` and `showClipboardPaste`), including `QuillToolbarClipboardButton` and `ClipboardMonitor` due to a performance issue [#2421](https://github.com/singerdmx/flutter-quill/issues/2421).
500501

501502
The functionality itself has not changed and no experimental changes were introduced.

lib/src/toolbar/buttons/clipboard_button.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1+
@experimental
2+
library;
3+
14
import 'dart:async';
25

36
import 'package:flutter/foundation.dart';
47
import 'package:flutter/material.dart';
8+
import 'package:meta/meta.dart';
59

610
import '../../common/utils/widgets.dart';
711
import '../../editor_toolbar_controller_shared/clipboard/clipboard_service_provider.dart';
812
import '../../l10n/extensions/localizations_ext.dart';
913
import '../base_button/base_value_button.dart';
1014
import '../simple_toolbar.dart';
1115

16+
@experimental
1217
enum ClipboardAction { cut, copy, paste }
1318

19+
@experimental
1420
class ClipboardMonitor {
1521
bool _canPaste = false;
1622
bool get canPaste => _canPaste;
@@ -35,6 +41,7 @@ class ClipboardMonitor {
3541
}
3642
}
3743

44+
@experimental
3845
class QuillToolbarClipboardButton extends QuillToolbarToggleStyleBaseButton {
3946
QuillToolbarClipboardButton({
4047
required super.controller,

lib/src/toolbar/config/simple_toolbar_config.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ class QuillSimpleToolbarConfig {
107107
this.showSearchButton = true,
108108
this.showSubscript = true,
109109
this.showSuperscript = true,
110-
this.showClipboardCut = false,
111-
this.showClipboardCopy = false,
112-
this.showClipboardPaste = false,
110+
@experimental this.showClipboardCut = false,
111+
@experimental this.showClipboardCopy = false,
112+
@experimental this.showClipboardPaste = false,
113113
this.linkStyleType = LinkStyleType.original,
114114
this.headerStyleType = HeaderStyleType.original,
115115

@@ -179,8 +179,11 @@ class QuillSimpleToolbarConfig {
179179
final bool showSearchButton;
180180
final bool showSubscript;
181181
final bool showSuperscript;
182+
@experimental
182183
final bool showClipboardCut;
184+
@experimental
183185
final bool showClipboardCopy;
186+
@experimental
184187
final bool showClipboardPaste;
185188

186189
/// This activates a functionality that is only implemented in [flutter_quill] and is NOT originally

0 commit comments

Comments
 (0)