修改button演示

null_safety
张萌 4 years ago
parent de4819b473
commit 03c40abaa6

@ -16,56 +16,46 @@ class _ExampleButtonState extends State<ExampleButton> {
title: 'ASButton',
body: ListView(
children: [
Row(
children: [
Text('danger'),
Spacer(),
ASButton.danger(
ListTile(
title: Text('danger'),
trailing: ASButton.danger(
title: '删除订单',
onPressed: () {},
),
],
),
Row(
children: [
Text('info'),
Spacer(),
ASButton.info(
ListTile(
title: Text('info'),
trailing: ASButton.info(
title: '删除订单',
onPressed: () {},
),
],
),
Row(
children: [
Text('warn'),
Spacer(),
ASButton.warn(
ListTile(
title: Text('warn'),
trailing: ASButton.warn(
title: '删除订单',
onPressed: () {},
),
],
),
Row(
children: [
Text('operation'),
Spacer(),
ASButton.operation(
ListTile(
title: Text('operation'),
trailing: ASButton.operation(
title: '删除订单',
onPressed: () {},
),
],
),
Row(
children: [
Text('order'),
Spacer(),
ASButton.order(
ListTile(
title: Text('order'),
trailing: ASButton.order(
title: '立即下单',
onPressed: () {},
)
],
),
)),
ListTile(
title: Text('order'),
subtitle: Text('null function'),
trailing: ASButton.order(
title: '立即下单',
)),
SizedBox(height: 12.w),
Row(
children: [
@ -80,30 +70,26 @@ class _ExampleButtonState extends State<ExampleButton> {
SizedBox(
height: 12.w,
),
Row(
children: [
Text('solid'),
Spacer(),
ASLongButton.solid(
ListTile(
title: Text('solid'),
trailing: ASLongButton.solid(
title: '确认',
onPressed: () {},
),
],
),
Row(
children: [
Text('hollow'),
Spacer(),
ASLongButton.hollow(
ListTile(
title: Text('hollow'),
trailing: ASLongButton.hollow(
title: '确认',
onPressed: () {},
),
],
),
Padding(
ListTile(
trailing: Padding(
padding: EdgeInsets.symmetric(horizontal: 100.w),
child: ASLongButton.solid(title: 'adaptable', onPressed: () {}),
),
),
SizedBox(
height: 12.w,
),
@ -120,25 +106,19 @@ class _ExampleButtonState extends State<ExampleButton> {
SizedBox(
height: 12.w,
),
Row(
children: [
Text('pay'),
Spacer(),
ASGradientButton.pay(
ListTile(
title: Text('pay'),
trailing: ASGradientButton.pay(
title: '支付',
onPressed: () {},
),
],
),
Row(
children: [
Text('opration'),
Spacer(),
ASGradientButton.operation(
ListTile(
title: Text('opration'),
trailing: ASGradientButton.operation(
title: '自动拆票',
onPressed: () {},
),
],
),
],
),

Loading…
Cancel
Save