ListDataBuilder<T>.string constructor

const ListDataBuilder<T>.string({
  1. required String labelBuilder(
    1. T data
    ),
  2. ListDataTileStyle? style,
})

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

It takes a labelBuilder which is a function that takes a data and returns a string label for the data.

Optionally, it takes a style which is a ListDataTileStyle object that is used to customize the appearance of the list tiles.

Returns a ListDataBuilderString object.

Implementation

const factory ListDataBuilder.string({
  required String Function(T data) labelBuilder,
  ListDataTileStyle? style,
}) = ListDataBuilderString;