xxxxxxxxxx
ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)),
),
)
xxxxxxxxxx
style: ButtonStyle(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
side: BorderSide(color: Colors.red)
)
)
)
xxxxxxxxxx
RaisedButton(
onPressed: () {},
color: Colors.amber,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
child: Text("Click This"),
)
xxxxxxxxxx
OutlinedButton(
child: Text('Woolha.com'),
style: OutlinedButton.styleFrom(
primary: Colors.white,
backgroundColor: Colors.teal,
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))),
),
)
xxxxxxxxxx
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.teal,
minimumSize: Size(width * 0.30, height * 0.08),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(width * 0.05),
)),
onPressed: () {},
child: Text(
"استمر" ),
)
xxxxxxxxxx
ElevatedButton(
onPressed: () {
debugPrint('ElevatedButton Clicked');
},
child: Text('ElevatedButton'),
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
)
xxxxxxxxxx
Padding(
padding: EdgeInsets.only(left: 150.0, right: 0.0),
child: RaisedButton(
textColor: Colors.white,
color: Colors.black,
child: Text("Search"),
onPressed: () {},
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
),
),
)
xxxxxxxxxx
RawMaterialButton(
onPressed: () {},
elevation: 2.0,
fillColor: Colors.white,
child: Icon(
Icons.pause,
size: 35.0,
),
padding: EdgeInsets.all(15.0),
shape: CircleBorder(),
)
xxxxxxxxxx
OutlinedButton(
style: ButtonStyle(
shape: MaterialStateProperty.resolveWith<RoundedRectangleBorder?>(
(Set<MaterialState> states) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16));
},
),
),
onPressed: () {},
child: const Text('Submit'),
);
xxxxxxxxxx
import 'package:flutter/material.dart';
class RoundedButton extends StatelessWidget {
final VoidCallback onPressed;
final String text;
RoundedButton({required this.onPressed, required this.text});
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
child: Text(text),
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
),
);
}
}
// Usage:
RoundedButton(
onPressed: () {
// Perform desired action here
},
text: 'Click Me',
)