spaced function

List<Widget> spaced({
  1. required List<Widget> children,
  2. EdgeInsets? space,
})

Implementation

List<Widget> spaced({required List<Widget> children, EdgeInsets? space}) {
  space ??= EdgeInsets.all(sunnySpacing.spaceUnit);
  final spaced = children.map((item) => item is Flexible ? item : Container(padding: space, child: item)).toList();
  return spaced;
}