How would you make a FlatButton
into a button with a rounded border? I have the rounded border shape using RoundedRectangleBorder
but somehow need to color the border.
new FlatButton( child: new Text("Button text), onPressed: null, shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(30.0)) )
Example of how button with rounded button would look :
Rounded corners HTML Buttons You can make rounded corners button by adding border-radius of 5px to 10px on HTML buttons.
Now you can change the button attribute to make it's border rounded by override the ViewController's viewDidLoad() function. Below is the ViewController. swift file's source code.
Use OutlinedButton
instead of FlatButton
.
OutlinedButton( onPressed: null, style: ButtonStyle( shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0))), ), child: const Text("Button text"), );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With