-
按钮
按钮
class MyHomeBody extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Column(
children: <Widget>[
FloatingActionButton(
child: Text("FloatingActionButton"),
onPressed: () {
print("FloatingActionButton Click");
},
),
RaisedButton(
child: Text("RaisedButton"),
onPressed: () {
print("RaisedButton Click");
},
),
FlatButton(
child: Text("FlatButton"),
onPressed: () {
print("FlatButton Click");
},
),
OutlineButton(
child: Text("OutlineButton"),
onPressed: () {
print("OutlineButton Click");
},
),
RaisedButton(
child: Text("自定义样式",style: TextStyle(color: Colors.red),),
color: Colors.orange,
highlightColor: Colors.orange[700],
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
onPressed: () {
print("自定义按钮");
},
),
],
);
}
}
网友评论