apply method
Apply existing NikuRaisedButton's property to current style
Example usage:
final padding = NikuRaisedButton(null)
.px(40)
.py(20)
final blueBackground = NikuRaisedButton(null)
.bg(Colors.blue)
build(context) {
return (
NikuRaisedButton(Text("Applied Style"))
.apply(padding) // Will have padding
.apply(blueBackground) // Will have blue background
.rounded(8)
.build() // Will combine all style
)
}
Implementation
NikuRaisedButton apply(NikuRaisedButton 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,
elevation: instance._elevation,
focusElevation: instance._focusElevation,
hoverElevation: instance._hoverElevation,
disabledElevation: instance._disabledElevation,
highlightElevation: instance._highlightElevation,
clipBehavior: instance._clipBehavior,
autofocus: instance._autofocus,
shape: instance._shape,
buttonTextTheme: instance._buttonTextTheme,
mt: instance._mt,
ml: instance._ml,
mb: instance._mb,
mr: instance._mr,
);