Button constructor

const Button({
  1. Key? key,
  2. Color? bgColor,
  3. required Widget child,
  4. double? borderRadius,
  5. EdgeInsetsGeometry? padding,
  6. EdgeInsetsGeometry? margin,
  7. 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,
});