set method

NikuButton set({
  1. VoidCallback? onPressed,
  2. VoidCallback? onLongPressed,
  3. FocusNode? focusNode,
  4. bool autofocus = false,
  5. Clip clipBehavior = Clip.none,
  6. NikuMaterialPropertyContainer<Color>? backgroundColor,
  7. NikuMaterialPropertyContainer<Color>? foregroundColor,
  8. NikuMaterialPropertyContainer<Color>? overlayColor,
  9. NikuMaterialPropertyContainer<Color>? shadowColor,
  10. NikuMaterialPropertyContainer<double>? elevation,
  11. double pt = 0,
  12. double pb = 0,
  13. double pl = 0,
  14. double pr = 0,
  15. double mt = 0,
  16. double mb = 0,
  17. double ml = 0,
  18. double mr = 0,
  19. NikuMaterialPropertyContainer<Size>? minimumSize,
  20. NikuMaterialPropertyContainer<BorderSide>? side,
  21. NikuMaterialPropertyContainer<RoundedRectangleBorder>? shape,
  22. NikuMaterialPropertyContainer<MouseCursor>? mouseCursor,
  23. VisualDensity? visualDensity,
  24. MaterialTapTargetSize? tapTargetSize,
  25. Duration? animationDuration,
  26. bool enableFeedback = false,
  27. AlignmentGeometry? alignment,
  28. Widget? label,
  29. NikuMaterialPropertyContainer<Color>? text_color,
  30. Color? text_backgroundColor,
  31. double? text_fontSize,
  32. FontWeight? text_fontWeight,
  33. FontStyle? text_fontStyle,
  34. double? text_letterSpacing,
  35. double? text_wordSpacing,
  36. double? text_height,
  37. Paint? text_foreground,
  38. Paint? text_background,
  39. List<Shadow>? text_shadows,
  40. List<FontFeature>? text_fontFeatures,
  41. TextDecoration? text_textDecoration,
  42. Color? text_textDecorationColor,
  43. double? text_textDecorationThickness,
  44. String? text_fontFamily,
  45. List<String>? text_fontFamilyFallback,
  46. TextBaseline? text_textBaseline,
})

Implementation

NikuButton set({
  VoidCallback? onPressed,
  VoidCallback? onLongPressed,
  FocusNode? focusNode,
  bool autofocus = false,
  Clip clipBehavior = Clip.none,
  NikuMaterialPropertyContainer<Color>? backgroundColor,
  NikuMaterialPropertyContainer<Color>? foregroundColor,
  NikuMaterialPropertyContainer<Color>? overlayColor,
  NikuMaterialPropertyContainer<Color>? shadowColor,
  NikuMaterialPropertyContainer<double>? elevation,
  double pt = 0,
  double pb = 0,
  double pl = 0,
  double pr = 0,
  double mt = 0,
  double mb = 0,
  double ml = 0,
  double mr = 0,
  NikuMaterialPropertyContainer<Size>? minimumSize,
  NikuMaterialPropertyContainer<BorderSide>? side,
  NikuMaterialPropertyContainer<RoundedRectangleBorder>? shape,
  NikuMaterialPropertyContainer<MouseCursor>? mouseCursor,
  VisualDensity? visualDensity,
  MaterialTapTargetSize? tapTargetSize,
  Duration? animationDuration,
  bool enableFeedback = false,
  AlignmentGeometry? alignment,
  Widget? label,
  NikuMaterialPropertyContainer<Color>? text_color,
  Color? text_backgroundColor,
  double? text_fontSize,
  FontWeight? text_fontWeight,
  FontStyle? text_fontStyle,
  double? text_letterSpacing,
  double? text_wordSpacing,
  double? text_height,
  Paint? text_foreground,
  Paint? text_background,
  List<Shadow>? text_shadows,
  List<FontFeature>? text_fontFeatures,
  TextDecoration? text_textDecoration,
  Color? text_textDecorationColor,
  double? text_textDecorationThickness,
  String? text_fontFamily,
  List<String>? text_fontFamilyFallback,
  TextBaseline? text_textBaseline,
}) {
  _onPressed = onPressed;
  _onLongPressed = onLongPressed;
  _focusNode = focusNode;
  _autofocus = autofocus;
  _clipBehavior = clipBehavior;
  _backgroundColor.update(
    base: backgroundColor?._base,
    disabled: backgroundColor?._disabled,
    dragged: backgroundColor?._dragged,
    error: backgroundColor?._error,
    focused: backgroundColor?._focused,
    hovered: backgroundColor?._hovered,
    pressed: backgroundColor?._pressed,
  );
  _foregroundColor.update(
    base: foregroundColor?._base,
    disabled: foregroundColor?._disabled,
    dragged: foregroundColor?._dragged,
    error: foregroundColor?._error,
    focused: foregroundColor?._focused,
    hovered: foregroundColor?._hovered,
    pressed: foregroundColor?._pressed,
  );
  _overlayColor.update(
    base: overlayColor?._base,
    disabled: overlayColor?._disabled,
    dragged: overlayColor?._dragged,
    error: overlayColor?._error,
    focused: overlayColor?._focused,
    hovered: overlayColor?._hovered,
    pressed: overlayColor?._pressed,
  );
  _shadowColor.update(
    base: shadowColor?._base,
    disabled: shadowColor?._disabled,
    dragged: shadowColor?._dragged,
    error: shadowColor?._error,
    focused: shadowColor?._focused,
    hovered: shadowColor?._hovered,
    pressed: shadowColor?._pressed,
  );
  _elevation.update(
    base: elevation?._base,
    disabled: elevation?._disabled,
    dragged: elevation?._dragged,
    error: elevation?._error,
    focused: elevation?._focused,
    hovered: elevation?._hovered,
    pressed: elevation?._pressed,
  );
  _pt = pt;
  _pb = pb;
  _pl = pl;
  _pr = pr;
  super.mt(mt);
  super.mb(mb);
  super.ml(ml);
  super.mr(mr);
  getMinimumSize.update(
    base: minimumSize?._base,
    disabled: minimumSize?._disabled,
    dragged: minimumSize?._dragged,
    error: minimumSize?._error,
    focused: minimumSize?._focused,
    hovered: minimumSize?._hovered,
    pressed: minimumSize?._pressed,
  );
  _side.update(
    base: side?._base,
    disabled: side?._disabled,
    dragged: side?._dragged,
    error: side?._error,
    focused: side?._focused,
    hovered: side?._hovered,
    pressed: side?._pressed,
  );
  _shape.update(
    base: shape?._base,
    disabled: shape?._disabled,
    dragged: shape?._dragged,
    error: shape?._error,
    focused: shape?._focused,
    hovered: shape?._hovered,
    pressed: shape?._pressed,
  );
  getMouseCursor.update(
    base: mouseCursor?._base,
    disabled: mouseCursor?._disabled,
    dragged: mouseCursor?._dragged,
    error: mouseCursor?._error,
    focused: mouseCursor?._focused,
    hovered: mouseCursor?._hovered,
    pressed: mouseCursor?._pressed,
  );
  _visualDensity = visualDensity;
  _tapTargetSize = tapTargetSize;
  _animationDuration = animationDuration;
  _enableFeedback = enableFeedback;
  _alignment = alignment;
  _label = label;

  _text_color.update(
    base: text_color?._base,
    disabled: text_color?._disabled,
    dragged: text_color?._dragged,
    error: text_color?._error,
    focused: text_color?._focused,
    hovered: text_color?._hovered,
    pressed: text_color?._pressed,
  );
  _text_backgroundColor = text_backgroundColor;
  _text_fontSize = text_fontSize;
  _text_fontWeight = text_fontWeight;
  _text_fontStyle = text_fontStyle;
  _text_letterSpacing = text_letterSpacing;
  _text_wordSpacing = text_wordSpacing;
  _text_height = text_height;
  _text_foreground = text_foreground;
  _text_background = text_background;
  _text_shadows = text_shadows;
  _text_fontFeatures = text_fontFeatures;
  _text_textDecoration = text_textDecoration;
  _text_textDecorationColor = text_textDecorationColor;
  _text_textDecorationThickness = text_textDecorationThickness;
  _text_fontFamily = text_fontFamily;
  _text_fontFamilyFallback = text_fontFamilyFallback;
  _text_textBaseline = text_textBaseline;

  return this;
}