From 92da3f4da82ebe29ad8157f2e59712a66e8a18e3 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Tue, 8 Dec 2020 14:31:48 +0800 Subject: [PATCH] update list tile --- lib/list_tile/as_option_tile.dart | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/list_tile/as_option_tile.dart b/lib/list_tile/as_option_tile.dart index 2b98731..0f0a248 100644 --- a/lib/list_tile/as_option_tile.dart +++ b/lib/list_tile/as_option_tile.dart @@ -27,24 +27,23 @@ class ASOptionTile extends StatelessWidget { @override Widget build(BuildContext context) { - return Padding( - padding: this.padding ?? EdgeInsets.fromLTRB(10.w, 10.w, 10.w, 0), - child: Material( + return Material( color: kForegroundColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.w), ), - child: item ?? - Column( - children: List.generate(length * 2 - 1, (index) { - final displayIndex = index ~/ 2; - if (index.isEven) - return items[displayIndex]; - else - return ASDivider(indent: 14.w, endIndent: 14.w); - }), - ), - ), - ); + child: Padding( + padding: this.padding ?? EdgeInsets.fromLTRB(10.w, 10.w, 10.w, 0), + child: item ?? + Column( + children: List.generate(length * 2 - 1, (index) { + final displayIndex = index ~/ 2; + if (index.isEven) + return items[displayIndex]; + else + return ASDivider(indent: 14.w, endIndent: 14.w); + }), + ), + )); } }