修改第6章示例
This commit is contained in:
parent
cd13efc8fb
commit
d97adda005
|
@ -13,6 +13,7 @@ class MyApp extends StatelessWidget {
|
|||
title: Text('CupertinoAlertDialog组件示例'),
|
||||
),
|
||||
body: Center(
|
||||
//添加对话框
|
||||
child: CupertinoAlertDialog(
|
||||
title: Text('提示'), //对话框标题
|
||||
content: SingleChildScrollView(
|
||||
|
@ -24,6 +25,7 @@ class MyApp extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
//对话框动作按钮
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: Text('确定'),
|
||||
|
@ -39,5 +41,4 @@ class MyApp extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -13,12 +13,13 @@ class MyApp extends StatelessWidget {
|
|||
title: Text('CupertinoButton组件示例'),
|
||||
),
|
||||
body: Center(
|
||||
//Cupertino风格按钮
|
||||
child: CupertinoButton(
|
||||
child: Text(//按钮label
|
||||
'CupertinoButton',
|
||||
),
|
||||
color: Colors.blue,//按钮颜色
|
||||
onPressed: (){},//按下事件回调
|
||||
child: Text(//按钮label
|
||||
'CupertinoButton',
|
||||
),
|
||||
color: Colors.blue,//按钮颜色
|
||||
onPressed: (){},//按下事件回调
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue