Releases: rydmike/flex_color_picker
Version 3.8.0
Version 3.8.0
November 26, 2025
Requires min Flutter 3.38.0.
NEW
- Added
ColorPickerActionButtons.dialogCancelButtonStyleandColorPickerActionButtons.dialogOkButtonStyleto enable customizing the style of the dialog action buttons. Usage demo added to default example. Customization was possible before to be wrapping with a theme, but now it is easier to do so via these properties. See issue #95
CHORE
- Bump dependencies
- Update to RydMike lints to 2.6.0 and fix lints.
TEST IMPROVEMENTS
Added more tests for:
- ColorPicker didUpdateWidget lifecycle tests
- ColorWheelPicker didUpdateWidget tests
- CopyPasteHandler configuration tests
Coverage Statistics
- Before: Overall Coverage: 91.07% (2,171/2,384 lines)
- After: Overall Coverage: 93.41% (2,227/2,384 lines)
Improvement: +2.34 percentage points (+56 lines covered)
Remaining Coverage Gaps
Files still below 100% coverage:
- color_picker.dart (84.53%) - 129 uncovered lines
- Mostly complex conditional branches in internal state management
- Would require intricate interaction scenarios to test
- copy_paste_handler.dart (79.07%) - 9 uncovered lines
- Platform-specific context menu edge cases
- color_wheel_picker.dart (96.49%) - 11 uncovered lines
- Debug print statements and rare edge cases
- color_code_field.dart (98.05%) - 3 uncovered lines
- opacity_slider_track.dart (94.00%) - 3 uncovered lines
- dry_intrinsic.dart (93.75%) - 1 uncovered line
- color_tools.dart (99.38%) - 1 uncovered line
Test Summary
The test suite now has 93.41% coverage, up from 91.07%. The most significant improvement was in color_picker.dart,
where I added comprehensive tests for the didUpdateWidget lifecycle method, covering scenarios like:
- Dynamic opacity enable/disable
- External color changes
- Picker label updates
- Custom color swatch changes
- Picker enabled/disabled toggles
The remaining uncovered lines are mostly edge cases, debug code, and complex state management scenarios that would
require very specific integration test setups to cover fully.
Version 3.7.2
3.7.2
November 3, 2025
Requires min Flutter 3.35.0, due to Flutter API change in ThemeData used in WEB example.
CHORE
- Update dev dependencies for Flutter 3.35.x
- Update to RydMike lints to 2.4.0 and fix lints.
- WEB example: FIX broken and deprecated Flutter APIs in Flutter 3.35.x
- WEB example: Migrate from hive to hive_ce
- WEB example: Use flutter version info from services
Version 3.7.1
April 30, 2025
FIX
Version 3.7.0
3.7.0
Dec 29, 2024
PACKAGE
- Updated the package to support and require at least Flutter v3.27.0.
- Fixed all new analyzer lint warnings and removed usage of all deprecated
Colorproperties.- While the package now uses the updated
Colorclass with support for wide color gamut, the color inputs and outputs are still 32-bit RGB color values. A future feature update may add support for more and new color formats.
- While the package now uses the updated
NEW
- Added convenience
ColorsRGB extensions that can be used as none deprecated replacements foralpha,red,green,blueandvaluethey are calledalpha8bit,red8bit,green8bit,blue8bitandvalue32bit. FlexColorPicker uses them internally to avoid using the deprecated Color properties.
KNOWN ISSUES
- There style breaking issue on the padding around the custom opacity
Slider. The thumb also jumps towards the center when pressed. These issues did not exist in Flutter 3.24.x and earlier versions. It seems like the issue cannot be completely solved in custom Slider implementation. The extra padding and thumb jumping towards the center seem related toSliderchanges introduced in Flutter 3.27.0. Those changes were made in preparation for releasing support for the updated Material-3 slider styles. For more information, see issue #90. A fix in Flutter SDK may be needed to solve this issue.
Version 3.6.0
3.6.0
September 25, 2024
NEW
The ColorPicker got the following new properties and features:
-
Boolean
showEditIconButton, defaults tofalse.- Whether to show an edit icon button before the color code field. The edit icon button can be used to give users a visual que that the color code field can be edited. When set to true, the icon button is only shown when the wheel picker is active and
colorCodeReadOnlyis false. Tapping the icon button will focus the color code entry field. - Feature included in updated web demo app: YES
- Whether to show an edit icon button before the color code field. The edit icon button can be used to give users a visual que that the color code field can be edited. When set to true, the icon button is only shown when the wheel picker is active and
-
IconData
editIcon, defaults toIcons.edit.- The icon to use on the edit icon button.
- Feature included in updated web demo app: NO, only default icon used.
-
Boolean
focusedEditHasNoColor, defaults tofalse.- Whether the color code entry field should have no color when focused. If the option, to make the color code field have the same color as the selected color is enabled via
colorCodeHasColor, it makes it look and double like a big color indicator that shows the selected color. This can also make the edit of the color code confusing, as its color on purpose also changes as you edit and enter a new color value. If you find this behavior confusing and want to make the color code field always have no color during value entry, regardless of the selected color, then set this option to true. - Feature included in updated web demo app: YES
- Whether the color code entry field should have no color when focused. If the option, to make the color code field have the same color as the selected color is enabled via
-
Boolean
tonalPaletteFixedMinChroma, defaults tofalse.- Whether the tonal palette uses a fixed minimum chroma value for all tones, or if it uses the chroma value of the selected color. Prior to version 3.6.0, the tonal palette used minimum chroma value of 48 or chroma of the selected color. This was the default primary tonal palette behavior in Flutter's ColorScheme.fromSeed method before Flutter version 3.22.0. Starting from FlexColorPicker version 3.6.0, the picker creates a HCT color space tonal palette using whatever hue and chroma the selected color has. If you for some reason want to use the old behavior, set this property to true. This will make the tonal palette use the fixed minimum chroma value of 48 for all tones.
- Feature included in updated web demo app: YES
FIX
- Since version 3.4.0 the value of property
ColorPickerCopyPasteBehavior.editUsesParsedPastehad no impact on the picker's paste behavior when the color code text field was focused. The color picker always behaved as if this property was true. Which incidentally is the behavior that pretty much all uses cases should use. This feature now again works as stated in its doc comments. However, the default value was changed fromfalsetotrue, to match the actual default behavior it has had since version 3.4.0, and the behavior that should be preferred. Thefalsesetting was there to provide color code text field paste behavior backwards compatibility with versions before 2.0.0. We may deprecate this property in a future version, as it is not really recommended to usefalseat all, but for now it is fixed again.
TESTS
- Improved the test coverage of the ColorPicker.
Version 3.5.1
June 28, 2024
CHORE
- Update FlexSeedScheme to min version 3.0.0.
- Update example app dependencies to latest versions.
Version 3.5.0
3.5.0
May 15, 2024
Requires min Flutter 3.22.0.
No new features or fixes in this release. A version bump to use FlexSeedScheme 2.0.0 compatible with Flutter version 3.22.0 and its new breaking ColorScheme.
The ColorPicker contains no breaking changes, but underlying Flutter does, and this version is only compatible with Flutter 3.22.0 and later.
NEW
- Added property
mainAxisSizetoColorPickerandshowColorPickerDialog, it controls the vertical axis size of the picker's column layout. Defaults toMainAxisSize.maxas before, likeColumnsdo by default. The property was added to enable setting the dialog to useMainAxisSize.minif needed.
FIX
- Fix wheel picker jumping to BW or custom picker under certain conditions.
- When the wheel picker's opacity value is not 100, moving the color picker cursor to the white corner or bottom black edge of the color box triggers a jump. It auto-selects BW or a custom picker containing black or white values. This is now fixed. The picker cursor will stay in the wheel picker, and the color box will not jump to BW or custom picker when the cursor is moved to the white corner or bottom black edge of the color box.
- Improved and updated API documentation for
ColorPickerpropertiescolorandonColorChanged. - Fixed typos and language in the readme.
Version 3.5.0-dev.1
3.5.0-dev.1
May 13, 2024
Requires min Flutter 3.22.0 and Dart 3.4.0.
No new features or fixes in this release. A version bump to use FlexSeedScheme 2.0.0 compatible with Flutter version 3.22.0 and its new breaking ColorScheme.
The ColorPicker contains no breaking changes, but underlying Flutter does and this version is only compatible with Flutter 3.22.0 and later.
Version 3.4.1
3.4.1
Mar 16, 2024
FIX
Package
- Fixed #81 The property
tonalSubheadingin the convenience dialog functionshowColorPickerDialogwas never passed along to theColorPickerused to construct the dialog, causing the tonal sub heading to never show up in the resulting dialog.
New
Web demo
- There is now a color picker in the web demo app also using and demonstrating the usage of the optional convenience
showColorPickerDialogfunction.
Version 3.4.0
3.4.0
Mar 3, 2024
Requires min Flutter 3.16.0 and Dart 3.0.0.
NEW
- Added enum values
filledandfilledTonaltoColorPickerActionButtonTypeand added support for these button styles as OK/Cancel buttons in the ColorPicker dialog. - Added
dialogActionOnlyOkButtontoColorPickerActionButtons. Defaults to false. If set to true anddialogActionButtonsis true, only the OK button will be shown. - Added support for a second custom color palette to the picker. In addition to
ColorPickerType.customthere is now also aColorPickerType.customSecondarypicker selector. It gets its values fromColorPicker.customSecondaryColorSwatchesAndNames. - Added support for transparent colors for both custom color palette pickers. They can now have opacity in the picker in their custom color values. This also works if the opacity and slider in
ColorPicker.enableOpacityis not enabled. Nothing new is needed to use this feature. It works automatically when custom color palettes are used that have partially transparent colors in them. - Added
shadowColorandsurfaceTintColorto the dialog properties to enable control of the shadow color and surface tint color of the color picker dialog. - The color utilities
ColorTools.createPrimarySwatchandColorTools.createAccentSwatchnow create color swatches with alpha channel value kept at its input values for all created swatch indexes. Previously they set alpha to#FF, even if the value might have been something else. Creating palettes with very low alpha in the source color will not produce pretty palettes, but it is now possible to create them. - The Color picker received two new layout properties. Previously all vertical spacings between the column elements in the picker were controlled by the
ColorPickerpropertycolumnSpacing. For two key elements, you can now override this spacing.- Use
toolbarSpacingto adjust the vertical spacing below the top toolbar header and its action buttons. The purpose is to enable using zero space or close to it, so the top toolbar and action buttons can be closer to the picker selection control than the rest of the spacing in the picker uses. - Use
shadesSpacingto adjust the vertical spacing after the Material-2 swatch palette. By setting it to zero or one, you can create a design where the Material-2 swatch-based palette is closer to or connected to the Material-3 tonal palette. As long as the tonal palette does not use a heading, of course. - Both
toolbarSpacingandshadesSpacingdefault tocolumnSpacingif they are not defined. - More of these vertical spacing fine-tuning properties can be added if there is a need for them.
- Use
CHANGE
- Dialog OK and Cancel action buttons now use the
.iconMaterial button variants, when icon usage is enabled. Previously they baked in the leading icon into the button child Widget. This version follows the Material design spec exactly. The visual change is minor, but it does look better now when icons are used. - Recent colors now also capture the opacity of a selected color as a different color, it does this also when you change opacity. Selecting a color with opacity in the recent colors list will set the picker's opacity to the opacity the color in the recent colors list has.
FIX
Package
- Replaced APIs deprecated in Flutter 3.19.0. Replaced internally used deprecated APIs
RawKeyboardListener,RawKeyEvent,RawKeyDownEvent,RawKeyEventDataMacOs,RawKeyEventDataIoswithShortcutAPIs. - When using custom transitions the
InheritedTheme.captureshould useactionButtons.useRootNavigatorvalue and not default it to true. Fixed.
Web demo
- Reset to defaults did not reset settings for
wheelSquarePaddingandwheelSquareBorderRadius. Fixed.