itemRenderer property

  1. @override
ItemRenderer<T> get itemRenderer
override

Implementation

@override
ItemRenderer<T> get itemRenderer => _itemRenderer;
  1. @Input()
  2. @override
set itemRenderer (ItemRenderer<T>? value)
override

An ItemRenderer function (takes an object and returns a string).

If ItemRenderer is not state-less, and may return different values for the same input item, then the ItemRenderer reference needs to update, or that change will not be reflected.

When provided, it is used to generate a label for the chip.

Implementation

@Input()
@override
set itemRenderer(ItemRenderer<T>? value) {
  _itemRenderer = value ?? nullRenderer;
  _genLabel();
}