|
|
|
@ -11,11 +11,15 @@ class ASOptionTile extends StatelessWidget {
|
|
|
|
|
///单个Widget
|
|
|
|
|
final Widget item;
|
|
|
|
|
|
|
|
|
|
///内边距
|
|
|
|
|
final EdgeInsetsGeometry padding;
|
|
|
|
|
|
|
|
|
|
///item 推荐使用`ASOptionTileItem`,`ASVerticalTileItem`,`ASListTile`
|
|
|
|
|
ASOptionTile({Key key, this.items, this.item}) : super(key: key);
|
|
|
|
|
ASOptionTile({Key key, this.items, this.item, this.padding})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
///单个子组件的Tile
|
|
|
|
|
ASOptionTile.single({Key key, @required this.item})
|
|
|
|
|
ASOptionTile.single({Key key, @required this.item, this.padding})
|
|
|
|
|
: items = [],
|
|
|
|
|
super(key: key);
|
|
|
|
|
|
|
|
|
@ -23,7 +27,9 @@ class ASOptionTile extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Material(
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: this.padding ?? EdgeInsets.fromLTRB(10.w, 10.w, 10.w, 0),
|
|
|
|
|
child: Material(
|
|
|
|
|
color: kForegroundColor,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(5.w),
|
|
|
|
@ -38,6 +44,7 @@ class ASOptionTile extends StatelessWidget {
|
|
|
|
|
return ASDivider(indent: 14.w, endIndent: 14.w);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|