joinWith method

List<Widget> joinWith(
  1. Widget item
)

Implementation

List<Widget> joinWith(Widget item)
{
  if (this == null) {
    return List.empty();
  }

  List<Widget> ret = [];

  for (int i = 0; i < this!.length; i++) {
    ret.add(this![i]);
    if (i < this!.length - 1) {
      ret.add(item);
    }
  }

  return ret;
}