Skip to content

Fix HEX editing, picker gestures, and wheel rendering - #117

Open
nohli wants to merge 24 commits into
fluttercandies:mainfrom
nohli:review/package-readiness
Open

nohli wants to merge 24 commits into
fluttercandies:mainfrom
nohli:review/package-readiness

Conversation

@nohli

@nohli nohli commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

I've fixed the picker interactions and example issues for 1.6.0.

Changes

  • Validate HEX input, preserve drafts during transparency and layout changes, and follow RGB changes from the parent.
  • Select colors only after a tap or drag is accepted; canceled touches keep the previous value.
  • Match wheel input to its painted hues and correct HSV labels.
  • Keep selected labels inside narrow dropdowns.
  • Preserve example colors, fix asset paths, and support scrolling with the keyboard open.

The package keeps its Flutter 2.10 minimum. The native example requires Flutter 3.47+.

Testing

  • All 44 package tests pass on Flutter 3.41.9, 3.44.9, and 3.47.7. The new editing bugs fail on the previous code and pass with these fixes.
  • All 3 example tests, analysis, and formatting pass on Flutter 3.47.7. pana scores 160/160; the publish dry run has zero warnings.
  • On Flutter 3.47.7, all seven picker modes pass on iOS 15.5, 16.4, 17.5, 18.6, 26.5, and 27.0; Android API 24, 31, 35, 36, and 37; and Wear OS API 30.

@nohli
nohli marked this pull request as ready for review October 10, 2026 09:06
@nohli
nohli requested a review from AlexV525 as a code owner October 10, 2026 09:06
Copilot AI balanced review requested due to automatic review settings October 10, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Pointer-down handlers can unintentionally change slider and wheel values when users begin scrolling.

2 open findings
What changed in this PR

Improves picker state synchronization, input handling, gesture behavior, example portability, and compatibility validation.

Changes:

  • Synchronizes external colors and safely validates HEX input.
  • Corrects picker gestures, wheel rendering, HSV labels, and color-channel compatibility.
  • Improves examples, documentation, tests, assets, and CI coverage.
File Description
.github/​workflows/​flutter_checks.yml Adds Flutter analysis and test CI.
CHANGELOG.md Documents unreleased changes.
README.md Corrects usage and behavior documentation.
analysis_options.yaml Excludes generated build files.
pubspec.yaml Allows supported Dart 3 releases.
lib/​src/​color_channels.dart Adds compatible 8-bit channel accessors.
lib/​src/​color_picker.dart Synchronizes parent color updates.
lib/​src/​pickers/​hsv_picker.dart Corrects HSV labels and units.
lib/​src/​pickers/​palette_hue_picker.dart Reformats hue colors.
lib/​src/​pickers/​rgb_picker.dart Uses compatible channel accessors.
lib/​src/​pickers/​swatches_picker.dart Removes unused animation resources.
lib/​src/​pickers/​wheel_picker.dart Aligns painting and tap coordinates.
lib/​src/​widgets/​hex_picker.dart Preserves resources and validates input.
lib/​src/​widgets/​slider_picker.dart Adds tap-based selection.
test/​hex_picker_test.dart Tests validation, state, and synchronization.
test/​hsv_labels_test.dart Tests corrected HSV labels.
test/​picker_gestures_test.dart Tests slider and wheel taps.
test/​swatches_picker_test.dart Tests final-swatch accessibility.
test/​wheel_rendering_test.dart Verifies painted hue coordinates.
example/​analysis_options.yaml Excludes generated platform directories.
example/​lib/​main.dart Retains colors and supports scrolling.
example/​lib/​complex_example/​main.dart Improves drawer, assets, and layout.
example/​pubspec.yaml Adds tests and corrects asset casing.
example/​test/​complex_example_test.dart Tests keyboard layout, assets, and destinations.
example/​test/​widget_test.dart Tests retained parent color state.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/src/pickers/wheel_picker.dart Resolved
Comment thread lib/src/widgets/slider_picker.dart Resolved
@nohli nohli closed this Oct 10, 2026
@nohli nohli reopened this Oct 10, 2026
@nohli
nohli marked this pull request as draft October 11, 2026 14:17
@nohli nohli changed the title Fix picker state, input coordinates, and example portability Fix HEX editing, picker gestures, and wheel rendering Oct 11, 2026
@nohli
nohli marked this pull request as ready for review October 11, 2026 14:20
@nohli
nohli requested a balanced review from Copilot October 11, 2026 16:11
@nohli
nohli marked this pull request as draft October 11, 2026 16:16
@nohli
nohli marked this pull request as ready for review October 11, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Alpha-only updates still discard active HEX edits, and the changelog removes the published 1.5.2 history.

2 open findings
2 resolved since last review

🧠 Review effort: Balanced

Comment thread lib/src/widgets/hex_picker.dart Resolved
Comment thread CHANGELOG.md Resolved
@nohli
nohli marked this pull request as draft October 11, 2026 16:22
@nohli
nohli marked this pull request as ready for review October 11, 2026 20:46
@nohli
nohli requested a balanced review from Copilot October 11, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nohli
nohli marked this pull request as draft October 11, 2026 20:49
@nohli
nohli marked this pull request as ready for review October 11, 2026 21:33
@nohli
nohli requested a lite review from Copilot November 4, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Two critical active issues block verification: both CI jobs cannot resolve the Flutter SDK dependency with standalone Dart, and the new test contains null-safety errors that prevent analysis.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

High severity Use Flutter to resolve the root package dependencies

.github/​workflows/​flutter_checks.yml:28

The root package declares flutter as an SDK dependency, but this invokes the standalone Dart package tool. dart pub get cannot resolve sdk: flutter in a Flutter package, so both matrix jobs fail before analysis and tests run. Use the Flutter wrapper here (for example, flutter pub get --no-example) instead.

High severity Assert the nullable test result before indexing bytes

test/​wheel_rendering_test.dart:34

tester.runAsync returns a nullable result, and the non-null assertion on line 31 does not promote the bytes variable for later expressions. These three indexed accesses therefore fail null-safety analysis; assert once when assigning the result (or retain ! on every access) before running the new test suite.

Review effort: Lite

@nohli

nohli commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

🔵 Needs a closer look

Two critical active issues block verification: both CI jobs cannot resolve the Flutter SDK dependency with standalone Dart, and the new test contains null-safety errors that prevent analysis.

No open issues 🎉

2 previously missed issues
In code that hasn't changed since last review

High severity Use Flutter to resolve the root package dependencies
High severity Assert the nullable test result before indexing bytes
Review effort: Lite

Both findings are false positives on the reviewed commit, b6227c8:

  1. Dependency resolution: The workflow installs Flutter before running dart pub get --no-example. That exact command succeeds on both Flutter 3.10.6 and stable; neither job fails at dependency resolution.

  2. Nullable test result: The assertion in bytes![0] promotes the local bytes variable to non-nullable for subsequent accesses. The later bytes[1], bytes[2], and bytes[3] expressions are valid. Analysis and tests pass on both Flutter versions.

CI results for the reviewed commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants