SelectionUpdater<V> typedef Null safety

SelectionUpdater<V> = V Function(V initialValue)

Updates an easthetic attribute value when the selection state of an element item changes.

You can define different selection updates for different selections and selection states (See details in Attr.onSelection).

The initialValue is the original item attribute value (Set or calculated.).

Make sure the return value is a different instance from initialValue.

See also:

  • Attr.onSelection, where selection updates are defined.


typedef SelectionUpdater<V> = V Function(V initialValue);