model/ui/has_renderer library

Classes

HasComponentRenderer<T extends RendersValue, I>
HasComponentRenderer defines a method that takes in an item and returns the type to use to render the item.
HasRenderer<T>
Interface for a class defining itemRenderer.
RendersValue<T>
Interface to render a value.

Constants

nullRenderer → const ItemRenderer
An ItemRenderer that indicates that components should not render items.

Functions

defaultItemRenderer(dynamic value) String
newCachingItemRenderer<T>(ItemRenderer<T> itemRenderer) ItemRenderer<T>
Returns an ItemRenderer that caches the results of calls. It should be used in Selection widgets.

Typedefs

ComponentRenderer<T extends RendersValue, I> = Type Function(I? item)
Defines a method that returns a component to render the Item. The component must implement RendersValue.
ItemRenderer<T> = String? Function(T item)
Definition for a method that takes in an item and converts it to a string.