spaced method

List<Widget> spaced(
  1. double space
)

Inserts horizontal and vertical spacing between each widget in the list.

The space parameter defines the amount of space to insert.

Example:

final widgets = [Text('A'), Text('B'), Text('C')];
final spacedWidgets = widgets.spaced(10.0);

Implementation

List<Widget> spaced(double space) {
  return insertBetween(space.spacing).toList();
}