close
How to add Border to ElevatedButton, elevated button, elevatedbutton, border to elevatedbutton, Border to ElevatedButton

How to add Border to ElevatedButton?

Hello guys how are you all? Hope you all are fine. As we know RaisedButton is deprecated and the Elevated button is replacing Raised Button widget with its new features. Here in this tutorial, we are going to learn How to add Border to ElevatedButton in Flutter.

How to add Border to ElevatedButton?

To add Border to ElevatedButton so we can use ElevatedButton.styleFrom’s side property which requires BorderSide. You can simply give side to BorderSide(color: Colors.red, width: 5). Let’s explore examples.

Example

           ElevatedButton(
              child: Text(
                'FlutterCorner.com',
                style: TextStyle(
                  color: Colors.black,
                ),
              ),
              style: ElevatedButton.styleFrom(
                primary: Colors.yellow,
                onPrimary: Colors.white,
                side: BorderSide(color: Colors.red, width: 5),
              ),
              onPressed: () {
                print('Button Pressed');
              },
            )

Output

How to Use ElevatedButton Widget Flutter,
ElevatedButton With Icon and Text,
Background color of Elevated Button in Flutter,
ElevatedButton Text Style,
ElevatedButton Shadow and Elevation,
ElevatedButton Border,
ElevatedButton Shape

Faq

  1. How to add Border to ElevatedButton?

    To add Border to ElevatedButton so we can use ElevatedButton.styleFrom’s side property which requires BorderSide. You can simply give side to BorderSide(color: Colors.red, width: 5). Let’s explore examples.

  2. Border to ElevatedButton

    To add Border to ElevatedButton so we can use ElevatedButton.styleFrom’s side property which requires BorderSide. You can simply give side to BorderSide(color: Colors.red, width: 5). Let’s explore examples.

Summery

So it’s all About this tutorial. Hope this above-all solution helped you a lot. Comment below Your thoughts and your queries. Comment Below on your suggestion.

Check Out Below Article


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *