Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elevated Button themedata border - Flutter

How can I implement sideBorder to elevatedButton through themedata.enter image description here

 elevatedButtonTheme: ElevatedButtonThemeData(
    style: ButtonStyle(side: MaterialStateProperty<BorderSide>//Stuck here),
  ),
like image 678
Raj A Avatar asked Aug 26 '26 09:08

Raj A


1 Answers

To use Theme Data border in Elevated Button, you have use styleFrom method

elevatedButtonTheme: ElevatedButtonThemeData(
          style: ElevatedButton.styleFrom(
          side: BorderSide(color: Colors.black, width: 2.5)) )

for more info styleFrom

like image 53
Anas Mohammed Avatar answered Aug 27 '26 22:08

Anas Mohammed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!