MBButton constructor

const MBButton({
  1. Key? key,
  2. required String text,
  3. Color? textColor,
  4. Color? buttonColor,
  5. IconData? icon,
  6. bool isIconButton = false,
  7. double? verticalPadding,
  8. double? horizontalPadding,
  9. double? roundness,
  10. double? elevation,
  11. required dynamic onTapFunction(),
})

MBButton decides it's child with the isIconButton value. If isIconButton true then MBButton's child is set to MBElevatedIconButton and MBElevatedButton if set to false.

Implementation

const MBButton({
  Key? key,
  required this.text,
  this.textColor,
  this.buttonColor,
  this.icon,
  this.isIconButton = false,
  this.verticalPadding,
  this.horizontalPadding,
  this.roundness,
  this.elevation,
  required this.onTapFunction,
}) : super(key: key);