|
|
@ -1,13 +1,12 @@
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:ansu_ui/extension/num_extension.dart';
|
|
|
|
import 'package:ansu_ui/extension/num_extension.dart';
|
|
|
|
|
|
|
|
|
|
|
|
extension SeparateExt on List<Widget>? {
|
|
|
|
extension SeparateExt on List<Widget> {
|
|
|
|
List<Widget>? sepWidget({Widget? separate}) {
|
|
|
|
List<Widget> sepWidget({Widget? separate}) {
|
|
|
|
if (this == null) return null;
|
|
|
|
if (this.isEmpty) return [];
|
|
|
|
if (this!.isEmpty) return [];
|
|
|
|
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];
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return separate ?? 10.wb;
|
|
|
|
return separate ?? 10.wb;
|
|
|
|
});
|
|
|
|
});
|
|
|
|