update separate

null_safety
张萌 4 years ago
parent 421a98e5b7
commit f6d02a1b95

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

Loading…
Cancel
Save