I'm trying to make a button which has rounded corners on the top and a normal corner on the bottom. How can I make it like this?
CSS Syntaxborder-top-left-radius: length|% [length|%]|initial|inherit; Note: If you set two values, the first one is for the top border, and the second one for the left border. If the second value is omitted, it is copied from the first. If either length is zero, the corner is square, not rounded.
An General Example :
RaisedButton(
onPressed: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(15.0),
topRight: Radius.circular(15.0))),
child: Text('Click Me!'),
color: Colors.blueAccent,
textColor: Colors.white,
),
As Per pskink Comment :
RaisedButton(
onPressed: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(15.0),
)),
child: Text('Click Me!'),
color: Colors.blueAccent,
textColor: Colors.white,
),
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