NButton constructor

NButton({
  1. Key? key,
  2. String type = "default",
  3. String size = "normal",
  4. String? text,
  5. double? width,
  6. double? height,
  7. dynamic color,
  8. Color? textColor,
  9. Widget? icon,
  10. bool block = false,
  11. bool plain = false,
  12. bool square = false,
  13. bool round = false,
  14. bool disabled = false,
  15. bool hairline = false,
  16. bool loading = false,
  17. EdgeInsets? padding,
  18. BorderRadius? borderRadius,
  19. dynamic onClick()?,
})

Implementation

NButton(
    {Key? key,
    this.type: "default",
    this.size: "normal",
    this.text,
    this.width,
    this.height,
    this.color,
    this.textColor,
    this.icon,
    this.block: false,
    this.plain: false,
    this.square: false,
    this.round: false,
    this.disabled: false,
    this.hairline: false,
    this.loading: false,
    this.padding,
    this.borderRadius,
    this.onClick})
    : assert(["mini", "small", "normal", "large"].indexOf(size) > -1,
          "size must be mini, small, normal, or large"),
      assert(
          ["default", "primary", "info", "danger", "warning"].indexOf(type) >
              -1,
          "type must be default, primary, info, danger or warning"),
      super(key: key);