修改button演示

null_safety
张萌 4 years ago
parent de4819b473
commit 03c40abaa6

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

Loading…
Cancel
Save