fix some issues

master
张萌 3 years ago
parent c4ffd5e326
commit 14be6925b9

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

Loading…
Cancel
Save