ListDataBuilder<T>.custom constructor

const ListDataBuilder<T>.custom({
  1. required Widget builder(
    1. BuildContext context,
    2. T data,
    3. ListTileMetadata metadata
    ),
})

A factory to create a ListDataBuilder that displays a list of data as custom widgets.

It takes a builder which is a function that takes a build context, a data, and a ListTileMetadata object, and returns a widget for the data.

The ListTileMetadata object contains information about whether the data is selected and whether the data is at an even index in the list.

Returns a ListDataBuilderCustom object.

Implementation

const factory ListDataBuilder.custom({
  required Widget Function(
    BuildContext context,
    T data,
    ListTileMetadata metadata,
  )
  builder,
}) = ListDataBuilderCustom;