fix some issues

master
张萌 3 years ago
parent c4ffd5e326
commit 14be6925b9

@ -31,17 +31,15 @@ class ASOptionTile extends StatelessWidget {
int get length => items!.length; int get length => items!.length;
@override List<Widget> get _widgets => leading == null
Widget build(BuildContext context) { ? (items ?? [])
if (this.leading != null) { : <Widget>[
this.items!.insert(
0,
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: this.leading is String child: this.leading is String
? Padding( ? Padding(
padding: EdgeInsets.symmetric( padding:
vertical: 14.w, horizontal: 10.w), EdgeInsets.symmetric(vertical: 14.w, horizontal: 10.w),
child: Text( child: Text(
this.leading, this.leading,
style: TextStyle( style: TextStyle(
@ -52,8 +50,11 @@ class ASOptionTile extends StatelessWidget {
) )
: this.leading, : this.leading,
), ),
); ...(items ?? []),
} ];
@override
Widget build(BuildContext context) {
return Material( return Material(
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
color: kForegroundColor, color: kForegroundColor,

Loading…
Cancel
Save