Button constructor

const Button({
  1. Key? key,
  2. bool block = false,
  3. bool danger = false,
  4. bool disabled = false,
  5. bool ghost = false,
  6. Widget? icon,
  7. bool loading = false,
  8. ButtonShape shape = ButtonShape.square,
  9. Size size = Size.medium,
  10. ButtonType type = ButtonType.normal,
  11. void onClick()?,
  12. Widget? child,
})

Implementation

const Button({
  Key? key,
  this.block = false,
  this.danger = false,
  this.disabled = false,
  this.ghost = false,
  this.icon,
  this.loading = false,
  this.shape = ButtonShape.square,
  this.size = Size.medium,
  this.type = ButtonType.normal,
  this.onClick,
  this.child,
})  : assert(child != null || icon != null,
          'Child and icon can not be both null'),
      super(key: key);