CrButton constructor

CrButton({
  1. Key? key,
  2. CrButtonType type = CrButtonType.normal,
  3. CrButtonSize size = CrButtonSize.normal,
  4. bool plain = false,
  5. bool loading = false,
  6. bool disabled = false,
  7. bool onlyText = false,
  8. bool round = false,
  9. String? text,
  10. Widget? child,
  11. IconData? icon,
  12. IconData? rightIcon,
  13. dynamic onTap() = noop,
})

Implementation

CrButton({
  Key? key,
  this.type = CrButtonType.normal,
  this.size = CrButtonSize.normal,
  this.plain = false,
  this.loading = false,
  this.disabled = false,
  this.onlyText = false,
  this.round = false,
  this.text,
  this.child,
  this.icon,
  this.rightIcon,
  this.onTap = noop,
}) {
  if (icon != null || rightIcon != null) {
    if (icon != null && rightIcon != null) {
      assert(true);
    }
  }
  if (text != null || child != null) {
    if (text != null && child != null) {
      assert(true);
    }
  }

  if (plain && type == CrButtonType.normal) {
    assert(true);
  }
}