Flutter 小部件,我尝试使用 BorderSide(color : Colors.blue) 更改 OutlineButton 边框颜色。无论设置哪种颜色,OutlineButton 始终带有灰色边框,但宽度更改适用。如何更改 OutlineButton 边框线条颜色?
class OutlineButtonWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: OutlineButton(
onPressed: null,
borderSide: BorderSide(
width: 5.0,
color: Colors.blue,
style: BorderStyle.solid,
),
child: Text('outline button')
),
),
);
}
}
Run Code Online (Sandbox Code Playgroud)