main.dart
import 'package:flutter/material.dart';
void main(){
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.purple),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - OutlinedButton Shape")
),
body: Center(
child: OutlinedButton(
onPressed: (){},
child: const Text("Click Me"),
style: OutlinedButton.styleFrom(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(24),
bottomRight: Radius.circular(24)
),
),
padding: const EdgeInsets.symmetric(
horizontal: 64, vertical: 24
)
)
),
)
),
),
);
}
More flutter tutorials
- flutter – How to change ElevatedButton color
- flutter – How to change ElevatedButton width
- flutter – How to change ElevatedButton size
- flutter – How to change ElevatedButton disabled color
- flutter – How to disable ElevatedButton
- flutter – How to change ElevatedButton border radius
- flutter – How to create circular ElevatedButton
- flutter – How to remove padding from ElevatedButton
- flutter – TextButton splash color
- flutter – How to set TextButton width
- flutter – TextButton style
- flutter – How to change TextButton color
- flutter – TextButton onPressed
- flutter – How to change OutlinedButton splash color
- flutter – How to add padding to OutlinedButton