divide method
- Widget separator
Divides a list of widgets with separators.
Implementation
Iterable<Widget> divide(Widget separator) sync* {
if (isEmpty) return;
final Iterator<Widget> iterator = this.iterator..moveNext();
yield iterator.current;
while (iterator.moveNext()) {
yield separator;
yield iterator.current;
}
}