Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: color picker dialog hex field value not setting correctly #2415

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- The color picker dialog's hex field does not use the correct value of the selected text in the editor [#2415](https://github.com/singerdmx/flutter-quill/pull/2415).

## [11.0.0-dev.16] - 2024-12-13

### Changed
Expand Down
4 changes: 2 additions & 2 deletions lib/src/toolbar/buttons/color/color_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class ColorPickerDialogState extends State<ColorPickerDialog> {
@override
void initState() {
super.initState();
hexController =
TextEditingController(text: color_picker.colorToHex(selectedColor));
if (widget.isToggledColor) {
selectedColor = widget.isBackground
? hexToColor(widget.selectionStyle.attributes['background']?.value)
: hexToColor(widget.selectionStyle.attributes['color']?.value);
}
hexController =
TextEditingController(text: color_picker.colorToHex(selectedColor));
EchoEllet marked this conversation as resolved.
Show resolved Hide resolved
}

@override
Expand Down
Loading