Elevated Button themedata border - Flutter

6.7k views Asked by At

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

 elevatedButtonTheme: ElevatedButtonThemeData(
    style: ButtonStyle(side: MaterialStateProperty<BorderSide>//Stuck here),
  ),
2

There are 2 answers

0
Anas On BEST ANSWER

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

1
teddy 225 On
elevatedButtonTheme: ElevatedButtonThemeData(
  style: ElevatedButton.styleFrom(
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(20),
    ),
  ),
),