首页 > 建站教程 > APP开发,混合APP >  Flutter 给raisedButton添加边框正文

Flutter 给raisedButton添加边框

Flutter raisedButton 并没有border属性,只能借助shape的RoundedRecangleBorder来进行添加,代码如下:
RaisedButton(
    onPressed: () {},
    child: Text(
        'Label Here',
        style: TextStyle(color: Colors.black),
    ),
    color: Colors.transparent,
    shape: RoundedRectangleBorder(
        side: BorderSide(color: Colors.blue)
    ),
),