1
0
mirror of https://github.com/krawieck/lemmur/ synced 2024-12-15 01:54:34 +01:00
lemmur-app-android/lib/util/extensions/spaced.dart
2020-10-23 00:38:25 +02:00

10 lines
279 B
Dart

import 'package:flutter/cupertino.dart';
/// Creates gaps between given widgets
extension SpaceWidgets on List<Widget> {
List<Widget> spaced(double gap) => expand((item) sync* {
yield SizedBox(width: gap, height: gap);
yield item;
}).skip(1).toList();
}