separatedBy method
Allows to insert a separator between the items of the iterable.
Implementation
List<Widget> separatedBy(Widget separator) {
final result = <Widget>[];
final iterator = this.iterator;
if (iterator.moveNext()) {
result.add(iterator.current);
while (iterator.moveNext()) {
result
..add(separator)
..add(iterator.current);
}
}
return result;
}