RectangularButton constructor
const
RectangularButton({
- Key? key,
- required Function onPressed,
- String text = 'Button',
- Color backgroundColor = Colors.blue,
- TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 20),
- Widget leading = const SizedBox(),
- Widget trailing = const SizedBox(),
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 10),
- EdgeInsetsGeometry margin = const EdgeInsets.all(0),
- double height = 36,
- double width = double.maxFinite,
- double cornerRadius = 4,
Implementation
const RectangularButton({
super.key,
required this.onPressed,
this.text = 'Button',
this.backgroundColor = Colors.blue,
this.textStyle = const TextStyle(
color: Colors.white,
fontSize: 20,
),
this.leading = const SizedBox(),
this.trailing = const SizedBox(),
this.padding = const EdgeInsets.symmetric(horizontal: 10),
this.margin = const EdgeInsets.all(0),
this.height = 36,
this.width = double.maxFinite,
this.cornerRadius = 4,
});