产生带有白色边框的OutlineButton
:
OutlineButton(
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.purple
)
),
)
产生带有紫色边框的
FlatButton
:FlatButton(
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.purple
)
),
)
OutlineButton
的部分文档:最佳答案
OutlineButton
有一个名为borderSide
的属性,您可以直接使用它:
OutlineButton(
borderSide: BorderSide(
color: Colors.purple
),
)
https://docs.flutter.io/flutter/material/OutlineButton/borderSide.html
关于Flutter:OutlineButton的side属性似乎无效,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53107976/