style: BorderStyle.none 設置顏色 是無效得bash
style: BorderStyle.solid 設置延是是有效得tcp
BoxBorder 能夠繪製爲矩形、圓形或圓形的框邊框的基類ide
源碼:abstract class BoxBorder extends ShapeBorder 不能實現ui
BeveledRectangleBorder 扁平或「斜角」角的矩形邊框spa
new Center(
child: new Container(
width: 300.0,
height: 48.0 ,
child: new RaisedButton(onPressed: (){
},color: Colors.grey,
child: new Text("登錄"),
shape: new BeveledRectangleBorder(borderRadius: BorderRadius.circular(20.0),side: new BorderSide(
style: BorderStyle.none,
)),
),
)
),
複製代碼
CircleBorder 可用空間內適合圓的邊界翻譯
顯示圓的Button3d
new Center(
child: new Container(
width: 300.0,
height: 80.0 ,
child: new RaisedButton(onPressed: (){
},color: Colors.grey,
child: new Text("登錄"),
//shape:new RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)) ,
shape: new CircleBorder(side: new BorderSide(
//設置 界面效果
color: Colors.green,
width: 80.0,
style: BorderStyle.none,
),),
),
)
),
複製代碼
StadiumBorder 半圓角矩形(StadiumBorder 翻譯:像體育場形狀的邊框)code
如上圖 屬性 color: Color(0xffFF7F24), 得效果 配合 style: BorderStyle.solid,ip
new Center(
child: new Container(
width: 300.0,
height: 48.0 ,
child: new RaisedButton(onPressed: (){
},color: Colors.grey,
child: new Text("登錄"),
shape: new StadiumBorder(side: new BorderSide(
style: BorderStyle.solid,
color: Color(0xffFF7F24),
)),
),
)
),
複製代碼
RoundedRectangleBorder 半圓角的矩形邊框ci
若是 RoundedRectangleBorder 設置了屬性(borderRadius: BorderRadius.circular(20.0)) 就和 StadiumBorder 差很少得形狀 (半圓角矩形)
而後經過shape屬性的 RoundedRectangleBorder 對圓角進行設置,以下:
new Center(
child: new Container(
width: 300.0,
height: 48.0 ,
child: new RaisedButton(onPressed: (){
},color: Colors.grey,
child: new Text("登錄"),
shape:new RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)) ,
),
)
),
複製代碼