add separate extension

null_safety
张萌 4 years ago
parent e6f16adff2
commit 71146f59e0

@ -0,0 +1,13 @@
import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
extension SeparateExt on List {
List sep([Widget separate]) {
return List.generate(this.length * 2 - 1, (index) {
if (index.isEven)
return this[index ~/ 2];
else
return separate ?? 10.wb;
});
}
}
Loading…
Cancel
Save