Skip to content

Commit

Permalink
chore: mark QuillController.clipboardSelection() as experimental API
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoEllet committed Nov 11, 2024
1 parent 16a2c4a commit 68b20e5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed

- Mark `shouldNotifyListeners` as experimental in `QuillController.replaceText()`.
- Mark the method `QuillController.clipboardSelection()` as experimental.

## [11.0.0-dev.11] - 2024-11-11

### Added
Expand Down
2 changes: 2 additions & 0 deletions doc/migration/10_to_11.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,5 +478,7 @@ in non-major releases:
- The `QuillControllerConfig.onClipboardPaste`.
- The `QuillEditorConfig.customLeadingBlockBuilder`.
- The magnifier feature including `QuillEditorConfig.magnifierConfiguration`.
- The `shouldNotifyListeners` in `QuillController.replaceText()`, `QuillController.replaceText()`, `QuillController.formatSelection()`.
- The `QuillController.clipboardSelection()`.

The functionality itself has not changed and no experimental changes were introduced.
9 changes: 5 additions & 4 deletions lib/src/controller/quill_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class QuillController extends ChangeNotifier {
Object? data,
TextSelection? textSelection, {
bool ignoreFocus = false,
bool shouldNotifyListeners = true,
@experimental bool shouldNotifyListeners = true,
}) {
assert(data is String || data is Embeddable || data is Delta);

Expand Down Expand Up @@ -355,7 +355,7 @@ class QuillController extends ChangeNotifier {
int index,
int len,
Attribute? attribute, {
bool shouldNotifyListeners = true,
@experimental bool shouldNotifyListeners = true,
}) {
if (len == 0 && attribute!.key != Attribute.link.key) {
// Add the attribute to our toggledStyle.
Expand All @@ -379,7 +379,7 @@ class QuillController extends ChangeNotifier {
}

void formatSelection(Attribute? attribute,
{bool shouldNotifyListeners = true}) {
{@experimental bool shouldNotifyListeners = true}) {
formatText(
selection.start,
selection.end - selection.start,
Expand Down Expand Up @@ -517,6 +517,7 @@ class QuillController extends ChangeNotifier {
Clipboard.setData(const ClipboardData(text: ''));
}

@experimental
bool clipboardSelection(bool copy) {
copiedImageUrl = null;

Expand Down Expand Up @@ -673,7 +674,7 @@ class QuillController extends ChangeNotifier {
String insertedText,
TextSelection? textSelection, {
bool ignoreFocus = false,
bool shouldNotifyListeners = true,
@experimental bool shouldNotifyListeners = true,
}) {
final containsEmbed =
insertedText.codeUnits.contains(Embed.kObjectReplacementInt);
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_flutter_quill.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ bool _isGitClean() {
return result.stdout.toString().trim().isEmpty;
}

/// Returns true if the specified [version] is already published on [pub.dev](https://pub.dev/).
/// Returns `true` if the specified [version] is already published on [pub.dev](https://pub.dev/).
Future<bool> _isPackageVersionPublished(String version) async {
final url = 'https://pub.dev/api/packages/$_packageName/versions/$version';
final response = await http.get(Uri.parse(url));
Expand Down

0 comments on commit 68b20e5

Please sign in to comment.