注意:当前version1.9.1+hotfix2,mac,下面的效果只能在iOS上有效,安卓无效
x下面的两种方式在iOS有效:
1.使用boxDecoration
return new Container(
decoration: new BoxDecoration(
color: Colors.grey,
borderRadius: BorderRadius.all(Radius.circular(5.0)),
border: Border.all(width: 2, color: Colors.green)),
padding: EdgeInsets.all(1),
child: new Text(
'测试按钮',
style: TextStyle(color: Colors.black),
),
);
2.使用shapeDecoeation
new Container(
decoration: new ShapeDecoration(
color: Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
side: BorderSide(
width: 2,
color: Colors.green,
),
)),
p