Skip to content

Commit

Permalink
Update clipboard_button.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim-Nikolaev committed Jan 17, 2025
1 parent 98e529f commit 9ee1427
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/src/toolbar/buttons/clipboard_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ class QuillToolbarClipboardButton extends QuillToolbarToggleStyleBaseButton {
}) : _options = options,
super(options: options ?? const QuillToolbarClipboardButtonOptions());

// TODO: This field will be used by the PR: https://github.com/singerdmx/flutter-quill/pull/2427
// ignore: unused_field
final QuillToolbarClipboardButtonOptions? _options;

final ClipboardAction clipboardAction;
Expand All @@ -96,7 +94,7 @@ class QuillToolbarClipboardButtonState
case ClipboardAction.paste:
return !controller.readOnly &&
(kIsWeb ||
(widget.options.enableClipboardPaste ?? _monitor.canPaste));
(widget._options?.enableClipboardPaste ?? _monitor.canPaste));
}
}

Expand Down Expand Up @@ -161,7 +159,7 @@ class QuillToolbarClipboardButtonState

bool get _shouldUseClipboardMonitor {
return widget.clipboardAction == ClipboardAction.paste &&
widget.options.enableClipboardPaste == null;
(widget._options?.enableClipboardPaste == null);
}

void _onPressed() {
Expand Down

0 comments on commit 9ee1427

Please sign in to comment.