buildAndJoinDivider<T> static method

List<Widget> buildAndJoinDivider<T>({
  1. required List<T> items,
  2. required Widget widgetBuilder(
    1. T item
    ),
})

Builds widgets from items and joins them with dividers.

This is a convenience wrapper around buildAndJoinWidgets that uses a standard divider as the separator.

Parameters:

  • items: List of items to build widgets from
  • widgetBuilder: Function to build a widget for each item

Implementation

static List<Widget> buildAndJoinDivider<T>(
    {required List<T> items,
    required Widget Function(T item) widgetBuilder}) {
  return buildAndJoinWidgets(
      items: items,
      widgetBuilder: widgetBuilder,
      interleaved: const Divider(thickness: 0, height: 1));
}