'How to change color of just the bottom side of the border of raised button in flutter?

How to change color of just one side of the border of a raised button in flutter? enter image description here



Solution 1:[1]

Wrap your raised button within a container. And give

Container(
decoration : BoxDecoration(
      border: Border(
          bottom: BorderSide(
               width:3,
               color : Colors.yellow
         ),
      ),
      child:RaisedButton()
)
)

Solution 2:[2]

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 ), ), ), ... enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 anjali nair
Solution 2 Rajasekaran K