You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansu_ui/lib/extension/separate_extension.dart

13 lines
316 B

import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
extension SeparateExt<T> on List {
List<T> sep({T separate}) {
return List.generate(this.length * 2 - 1, (index) {
if (index.isEven)
return this[index ~/ 2];
else
return separate ?? 10.wb;
});
}
}