mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-06-03 08:17:18 +08:00
fix:code
This commit is contained in:
@ -20,17 +20,17 @@ class _Demo extends State<SimpleDialogDemo> {
|
||||
showDialog<Null>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return new SimpleDialog(
|
||||
title: new Text('选择'),
|
||||
return SimpleDialog(
|
||||
title: Text('选择'),
|
||||
children: <Widget>[
|
||||
new SimpleDialogOption(
|
||||
child: new Text('选项 1'),
|
||||
SimpleDialogOption(
|
||||
child: Text('选项 1'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
new SimpleDialogOption(
|
||||
child: new Text('选项 2'),
|
||||
SimpleDialogOption(
|
||||
child: Text('选项 2'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
@ -41,12 +41,12 @@ class _Demo extends State<SimpleDialogDemo> {
|
||||
);
|
||||
}
|
||||
Widget build(BuildContext context) {
|
||||
return new RaisedButton(
|
||||
padding: new EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 10.0),
|
||||
return RaisedButton(
|
||||
padding: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 10.0),
|
||||
//padding
|
||||
child: new Text(
|
||||
child: Text(
|
||||
'show SimpleDialog',
|
||||
style: new TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 18.0, //textsize
|
||||
color: Colors.white, // textcolor
|
||||
),
|
||||
|
Reference in New Issue
Block a user