onRecentColorsChanged property

ValueChanged<List<Color>>? onRecentColorsChanged
final

Optional callback that returns the current list of recently selected colors.

This optional callback is called every time a new color is added to the recent colors list with the complete current list of recently used colors.

If the optional callback is not provided, then it is not called. You can use this callback to save and restore the recently used colors. To initialize the list when the color picker is created give it a starting via recentColors. This could be a list kept just in state during the current app session, or it could have been persisted and restored from a previous session.

Implementation

final ValueChanged<List<Color>>? onRecentColorsChanged;