flutter
Create rounded border button in Flutter
November 14, 2022
We can create a button with a rounded border using the OutlinedButton widget in Flutter.
OutlinedButton(
onPressed: () { print("Button is pressed"); },
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0),
),
),
),
child: const Text("Share"),
),
We are using OutlinedButton() button widget here and using border-radius we are making its corners rounded.
Was this helpful?
Similar Posts