as listTileX add prefix and suffix

null_safety
小赖 4 years ago
parent 285aa7d75c
commit e20275d028

@ -6,11 +6,17 @@ class ASListTileX extends StatelessWidget {
final Widget title; final Widget title;
final Widget suffix; final Widget suffix;
final double height; final double height;
final List<Widget> prefixes;
final Widget child;
final List<Widget> suffixes;
const ASListTileX({ const ASListTileX({
Key key, Key key,
@required this.title, @required this.title,
this.suffix, this.suffix,
this.height, this.height,
this.prefixes,
this.child,
this.suffixes,
}) : super(key: key); }) : super(key: key);
@override @override
@ -18,12 +24,14 @@ class ASListTileX extends StatelessWidget {
return Row( return Row(
children: [ children: [
10.wb, 10.wb,
(height ?? 46).hb,
DefaultTextStyle( DefaultTextStyle(
style: TextStyle().black65.size(14), style: TextStyle().black65.size(14),
child: title, child: title,
), ),
...prefixes ?? [],
Spacer(), Spacer(),
(height ?? 46).hb, ...suffixes ?? [],
suffix ?? SizedBox(), suffix ?? SizedBox(),
], ],
); );

Loading…
Cancel
Save