修改button

null_safety
张萌 4 years ago
parent aa57f57d2f
commit 530c1be0d3

@ -13,70 +13,133 @@ class _ExampleButtonState extends State<ExampleButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ASScaffold( return ASScaffold(
title: 'Button', title: 'ASButton',
body: ListView( body: ListView(
children: [ children: [
ASButton.delete( Row(
title: '删除订单', children: [
onPressed: () {}, Text('delete'),
Spacer(),
ASButton.delete(
title: '删除订单',
onPressed: () {},
),
],
), ),
ASButton.info( Row(
title: '删除订单', children: [
onPressed: () {}, Text('info'),
Spacer(),
ASButton.info(
title: '删除订单',
onPressed: () {},
),
],
),
Row(
children: [
Text('warn'),
Spacer(),
ASButton.warn(
title: '删除订单',
onPressed: () {},
),
],
), ),
ASButton.warn( Row(
title: '删除订单', children: [
onPressed: () {}, Text('opration'),
Spacer(),
ASButton.opration(
title: '删除订单',
onPressed: () {},
),
],
), ),
ASButton.opration( Row(
title: '删除订单', children: [
onPressed: () {}, Text('order'),
Spacer(),
ASButton.order(
title: '立即下单',
onPressed: () {},
)
],
), ),
SizedBox(height: 12.w), SizedBox(height: 12.w),
ASLongButton.solid( Row(
title: '确认', children: [
onPressed: () {}, Spacer(),
), Text(
ASLongButton.hollow( 'ASLongButton',
title: '确认', style: TextStyle(fontSize: 20.sp, fontWeight: FontWeight.bold),
onPressed: () {}, ),
Spacer(),
],
), ),
Padding( SizedBox(
padding: EdgeInsets.symmetric(horizontal: 100.w), height: 12.w,
child: ASLongButton.solid(title: 'null', onPressed: () {}),
), ),
Row( Row(
children: [ children: [
ASGradientButton.pay( Text('solid'),
title: '支付', Spacer(),
ASLongButton.solid(
title: '确认',
onPressed: () {}, onPressed: () {},
), ),
ASButton.delete( ],
title: '删除', ),
onPressed: () {}, Row(
), children: [
ASGradientButton.operation( Text('hollow'),
title: 'null', Spacer(),
ASLongButton.hollow(
title: '确认',
onPressed: () {}, onPressed: () {},
), ),
], ],
), ),
ASLongButton.hollow(
title: '确认',
onPressed: () {},
),
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 100.w), padding: EdgeInsets.symmetric(horizontal: 100.w),
child: ASLongButton.solid(title: 'null', onPressed: () {}), child: ASLongButton.solid(title: 'adaptable', onPressed: () {}),
),
SizedBox(
height: 12.w,
), ),
Row( Row(
children: [ children: [
ASButton.order( Spacer(),
title: '立即下单', Text(
'ASGradientButton',
style: TextStyle(fontSize: 20.sp, fontWeight: FontWeight.bold),
),
Spacer(),
],
),
SizedBox(
height: 12.w,
),
Row(
children: [
Text('pay'),
Spacer(),
ASGradientButton.pay(
title: '支付',
onPressed: () {}, onPressed: () {},
) ),
], ],
) ),
Row(
children: [
Text('opration'),
Spacer(),
ASGradientButton.operation(
title: '自动拆票',
onPressed: () {},
),
],
),
], ],
), ),
); );

Loading…
Cancel
Save