Add Show Border Around Raised Button in Flutter Android iOS

Flutter comes with inbuilt widget known as OutlineButton to set border on button but there seems to be a problem working with it. I have tried and the OutlineButton widget did not support button background color somehow. So to avoid that particular problem now we are using Raised Button widget in our tutorial. Raised button is our main button widget mostly used in flutter applications. Raised button has Border Side property which is used to Add Show Border Around Raised Button in Flutter Android iOS example tutorial.

Contents in this project Add Show Border Around Raised Button in Flutter Android iOS:

1. Import material.dart package in your app’s main.dart file.

2. Create void main runApp() method and call our main MyApp() class with it.

3. Create our main MyApp class extends with State less widget. This is our main root view class.

4. Create a Center widget in Widget build area in MyApp class.

5. Create Raised Button widget in Center widget. We are using RoundedRectangleBorder property of shape and Border Side to apply border on Raised button.

6. Complete source code for main.dart file:

Screenshot:

Add Show Border Around Raised Button in Flutter Android iOS

Leave a Reply

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