apply method

NikuFlatButton apply(
  1. NikuFlatButton instance
)

Apply existing NikuFlatButton's property to current style

Example usage:

final padding = NikuFlatButton(null)
  .px(40)
  .py(20)

final blueBackground = NikuFlatButton(null)
  .bg(Colors.blue)

build(context) {
  return (
    NikuFlatButton(Text("Applied Style"))
      .apply(padding) // Will have padding
      .apply(blueBackground) // Will have blue background
      .rounded(8)
      .build() // Will combine all style
  )
}

Implementation

NikuFlatButton apply(NikuFlatButton instance) => this.set(
      onPressed: this._onPressed,
      onLongPressed: this._onLongPressed,
      pt: instance._pt,
      pl: instance._pl,
      pb: instance._pb,
      pr: instance._pr,
      color: instance._color,
      disabledColor: instance._disabledColor,
      focusColor: instance._focusColor,
      hoverColor: instance._hoverColor,
      highlightColor: instance._highlightColor,
      splashColor: instance._splashColor,
      textColor: instance._textColor,
      colorBrightness: instance._colorBrightness,
      clipBehavior: instance._clipBehavior,
      autofocus: instance._autofocus,
      minWidth: instance._minWidth,
      height: instance._height,
      shape: instance._shape,
      buttonTextTheme: instance._buttonTextTheme,
      mt: instance._mt,
      ml: instance._ml,
      mb: instance._mb,
      mr: instance._mr,
    );