Button constructor
const
Button({
- Key? key,
- Color? bgColor,
- required Widget child,
- double? borderRadius,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- dynamic onPressed()?,
Implementation
const Button({
super.key,
/// The Background color for button is not specified
/// then theme's primary color will be used.
this.bgColor,
required this.child,
/// Border radius for the button.
this.borderRadius,
/// padding for the child of the button.
this.padding,
/// margin of the button.
this.margin,
/// function that will be triggered on button press.
this.onPressed,
});