浏览代码

[Cupertino] Annotate bug demo

/main
iizzaya 5 年前
当前提交
65b1356c
共有 2 个文件被更改,包括 54 次插入53 次删除
  1. 77
      Samples/UIWidgetsGallery/demo/cupertino/cupertino_alert_demo.cs
  2. 30
      Samples/UIWidgetsGallery/demo/cupertino/cupertino_slider_demo.cs

77
Samples/UIWidgetsGallery/demo/cupertino/cupertino_alert_demo.cs


);
}
),
new Padding(padding: EdgeInsets.all(8.0f)),
CupertinoButton.filled(
child: new Text("Action Sheet"),
padding: EdgeInsets.symmetric(vertical: 16.0f, horizontal: 36.0f),
onPressed: () => {
this.showDemoActionSheet(
context: _context,
child: new CupertinoActionSheet(
title: new Text("Favorite Dessert"),
message: new Text(
"Please select the best dessert from the options below."),
actions: new List<Widget> {
new CupertinoActionSheetAction(
child: new Text("Profiteroles"),
onPressed: () => {
Navigator.pop(_context, "Profiteroles");
}
),
new CupertinoActionSheetAction(
child: new Text("Cannolis"),
onPressed: () => {
Navigator.pop(_context, "Cannolis");
}
),
new CupertinoActionSheetAction(
child: new Text("Trifle"),
onPressed: () => { Navigator.pop(_context, "Trifle"); }
)
},
cancelButton: new CupertinoActionSheetAction(
child: new Text("Cancel"),
isDefaultAction: true,
onPressed: () => { Navigator.pop(_context, "Cancel"); }
)
)
);
}
)
// TODO: FIX BUG
// new Padding(padding: EdgeInsets.all(8.0f)),
// CupertinoButton.filled(
// child: new Text("Action Sheet"),
// padding: EdgeInsets.symmetric(vertical: 16.0f, horizontal: 36.0f),
// onPressed: () => {
// this.showDemoActionSheet(
// context: _context,
// child: new CupertinoActionSheet(
// title: new Text("Favorite Dessert"),
// message: new Text(
// "Please select the best dessert from the options below."),
// actions: new List<Widget> {
// new CupertinoActionSheetAction(
// child: new Text("Profiteroles"),
// onPressed: () => {
// Navigator.pop(_context, "Profiteroles");
// }
// ),
// new CupertinoActionSheetAction(
// child: new Text("Cannolis"),
// onPressed: () => {
// Navigator.pop(_context, "Cannolis");
// }
// ),
// new CupertinoActionSheetAction(
// child: new Text("Trifle"),
// onPressed: () => { Navigator.pop(_context, "Trifle"); }
// )
// },
// cancelButton: new CupertinoActionSheetAction(
// child: new Text("Cancel"),
// isDefaultAction: true,
// onPressed: () => { Navigator.pop(_context, "Cancel"); }
// )
// )
// );
// }
// )
}
)
};

30
Samples/UIWidgetsGallery/demo/cupertino/cupertino_slider_demo.cs


child: new Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: new List<Widget> {
new Column(
mainAxisSize: MainAxisSize.min,
children: new List<Widget> {
new CupertinoSlider(
value: this._value,
min: 0.0f,
max: 100.0f,
divisions: 100, // TODO: FIX BUG
onChanged: (float value) => {
this.setState(() => { this._value = value; });
}
),
new Text($"Cupertino Continuous: {this._value.ToString("F1")}"),
}
),
// TODO: FIX BUG
// new Column(
// mainAxisSize: MainAxisSize.min,
// children: new List<Widget> {
// new CupertinoSlider(
// value: this._value,
// min: 0.0f,
// max: 100.0f,
// onChanged: (float value) => {
// this.setState(() => { this._value = value; });
// }
// ),
// new Text($"Cupertino Continuous: {this._value.ToString("F1")}"),
// }
// ),
new Column(
mainAxisSize: MainAxisSize.min,
children: new List<Widget> {

正在加载...
取消
保存