Flutter教学

Flutter(38):Cupertino组件之Cupertin

2020-10-07  本文已影响0人  starryxp

Flutter教学目录持续更新中

Github源代码持续更新中

1.CupertinoButton介绍

2.CupertinoButton、CupertinoButton.filled属性

3.CupertinoButton、CupertinoButton.filled

1601964982(1).png

···
class _CupertinoButtonPageState extends State<CupertinoButtonPage> {
_myCupertinoButton() {
return CupertinoButton(
child: Text('CupertinoButton'),
padding: EdgeInsets.all(10),
color: Colors.amber,
disabledColor: Colors.grey,
minSize: 50,
pressedOpacity: 0.4,
borderRadius: BorderRadius.circular(10),
onPressed: () {
ToastUtil.showToast('CupertinoButton');
},
);
}

_myCupertinoButtonFilled() {
return CupertinoButton.filled(
child: Text('CupertinoButton'),
onPressed: () {},
);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('CupertinoButton'),
),
body: ListView(
padding: EdgeInsets.all(10),
children: [
_myCupertinoButton(),
_myCupertinoButtonFilled(),
],
),
);
}
}
···
下一节:Cupertino组件之CupertinoDialog、CupertinoPopupSurface

Flutter(39):Cupertino组件之CupertinoDialog、CupertinoPopupSurface

Flutter教学目录持续更新中

Github源代码持续更新中

上一篇 下一篇

猜你喜欢

热点阅读