[英]How to change color of just the bottom side of the border of raised button in flutter?
Wrap your raised button within a container.将凸起的按钮包裹在容器中。 And give并给
Container(
decoration : BoxDecoration(
border: Border(
bottom: BorderSide(
width:3,
color : Colors.yellow
),
),
child:RaisedButton()
)
)
Try this one... DecoratedBox( decoration:const BoxDecoration( border: Border( bottom: BorderSide(color: Colors.grey), ), ), child: ElevatedButton( onPressed: () { }, child:const Text('Button'), style: ElevatedButton.styleFrom( elevation: 0, primary: Colors.white, onPrimary: Colors.black ), ), ), ...试试这个... DecoratedBox( decoration:const BoxDecoration( border: Border( bottom: BorderSide(color: Colors.grey), ), ), child: ElevatedButton( onPressed: () { }, child:const Text('Button '), 样式: ElevatedButton.styleFrom( elevation: 0, primary: Colors.white, onPrimary: Colors.black ), ), ), ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.