1、按钮CupertinoButton
/// Creates an iOS-style button.
const CupertinoButton({
Key key,
@required this.child,//通常是一个Text
this.padding,//内边距,默认16
this.color,
this.disabledColor = CupertinoColors.quaternarySystemFill,
this.minSize = kMinInteractiveDimensionCupertino,//最小尺寸,默认44
this.pressedOpacity = 0.4,//按下时透明度,默认0.4
this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),//圆角,默认8
@required this.onPressed,//点击事件,为空时禁用
})
2、对话框CupertinoAlertDialog
/// Creates an iOS-style alert dialog.
const CupertinoAlertDialog({
Key key,
this.title,
this.content,
this.actions = const <Widget>[],//不能为空
this.scrollController,
this.actionScrollController,
this.insetAnimationDuration = const Duration(milliseconds: 100),
this.insetAnimationCurve = Curves.decelerate,
})
CupertinoAlertDialog(
title: Text("温馨提示"),
content: SingleChildScrollView(
//对话框内容部分
child: ListBody(
children: [
Text('是否要删除?'),
Text('一旦删除数据不可恢复!'),
],
),
),
actions: <Widget>[
CupertinoDialogAction(
child: Text("取消"),
onPressed: () {
Navigator.pop(context);
print("取消");
},
),
CupertinoDialogAction(
child: Text("确定"),
onPressed: () {
print("确定");
},
),
],
);
3、Widges列表
1.App结构相关:
CupertinoApp
CupertinoPageScaffold
CupertinoNavigationBar
CupertinoTabBar
CupertinoTabController
CupertinoTabScaffold
CupertinoTabView
2.UI相关
CupertinoButton
CupertinoActionSheet
CupertinoActionSheetAction
CupertinoActivityIndicator
CupertinoContextMenu/CupertinoContextMenuAction
CupertinoDatePicker
CupertinoAlertDialog/CupertinoDialogAction
CupertinoUserInterfaceLevel
CupertinoPicker
CupertinoSliverRefreshControl
CupertinoScrollbar
CupertinoSegmentedControl
CupertinoSlider
CupertinoSlidingSegmentedControl
CupertinoSwitch
CupertinoTextField
CupertinoTextSelectionToolbar
3.其他:
CupertinoPageRoute
CupertinoTextThemeData
CupertinoTheme
CupertinoThumbPainter
CupertinoDynamicColor
网友评论