首页 > 建站教程 > APP开发,混合APP >  Flutter RaisedButton设置圆角和边框正文

Flutter RaisedButton设置圆角和边框

Flutter RaisedButton可以设置圆角和边框,都在shape中设置,边框和Container等常规的边框设置略有差异:
RaisedButton(
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(28),
      side: BorderSide(color: Colors.red)
    ),
    color: Colors.white,
    elevation:0,
    highlightElevation:0,
    disabledElevation:0,
    onPressed: (){},
    child: Text('拒绝'),
)