mapSeperated method

List<Widget> mapSeperated({
  1. required Widget builder(
    1. T
    ),
  2. required Widget separator(
    1. int
    ),
})

Implementation

List<Widget> mapSeperated({
  required Widget Function(T) builder,
  required Widget Function(int) separator,
}) =>
    mapIndexed((index, e) => Column(
          children: [
            builder(e),
            if (index != length - 1) separator(index),
          ],
        )).toList();