From 1321131ec0632f03b2a1285b21508a37fe01c948 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 3 Mar 2021 14:42:06 +0800 Subject: [PATCH] update as dialog --- lib/dialog/as_dialog.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/dialog/as_dialog.dart b/lib/dialog/as_dialog.dart index f51bf2c..9857edf 100644 --- a/lib/dialog/as_dialog.dart +++ b/lib/dialog/as_dialog.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:ansu_ui/styles/as_colors.dart'; import 'package:ansu_ui/extension/num_extension.dart'; +import 'package:ansu_ui/extension/list_extension.dart'; class ASDialog extends StatefulWidget { final bool close; @@ -78,12 +79,8 @@ class _ASDialogState extends State { ), ), ), - ...List.generate(widget.items.length * 2 - 1, (index) { - if (index.isEven) - return widget.items[index ~/ 2]; - else - return _widgetSpacer.hb; - }), + ...widget.items + .sepWidget(separate: SizedBox(height: _widgetSpacer)), ], ), ),