Produces an OutlineButton
with a white border:
OutlineButton(
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.purple
)
),
)
Produces a FlatButton
with a purple border:
FlatButton(
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.purple
)
),
)
Part of the documentation for OutlineButton
:
borderSide → BorderSide Defines the color of the border when the button is enabled but not pressed, and the border outline's width and style in general. [...] final
OutlineButton
has a property named borderSide
you can use it directly :
OutlineButton(
borderSide: BorderSide(
color: Colors.purple
),
)
https://docs.flutter.io/flutter/material/OutlineButton/borderSide.html
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