Menu

1 / 5

chroma_picker: maintained color pickers for Flutter with the modern Color API

DEV Community: mobile·Abdeldjalil Chougui·13 days ago
#1JRFceY5
#devtomobile#devto#dev#rrggbbaa#aarrggbb
Long article (1333 words) — no AI summary yet.
Reading 0:00
15s threshold

A color picker looks like a solved problem until you upgrade Flutter. Since Flutter 3.27, the old Color members ( withOpacity , .red , .green , .blue , .alpha , .opacity , .value ) are deprecated, and a package that still uses them fills your analyzer output with warnings you cannot fix from your own code. The README of chroma_picker counts them for flutter_colorpicker 1.1.0: on Flutter 3.35, flutter analyze reports 70 deprecated_member_use hits in its lib/ .

The warnings are the visible part. The same package has older bugs that users notice: a hex field that displays #RRGGBBAA but parses #AARRGGBB , a pointer that jumps when you pick a grey, and a hue slider that looks stuck on black.

chroma_picker is a clean-room replacement. It keeps the widget names most apps already use, reads colors only through the new API, and adds keyboard and screen reader support.

What it does

Six pickers. ColorPicker is the main one: a 2D palette with a channel slider and an alpha slider.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.