minimumSize method

NikuButton minimumSize(
  1. Size? base,
  2. Size? disabled,
  3. Size? dragged,
  4. Size? error,
  5. Size? focused,
  6. Size? hovered,
  7. Size? pressed,
  8. Size? selected,
)

Apply custom shape to button

Set minimum size of button

TextButton(
  minimumSize: MaterialStateProperty.resolveWith<OutlinedBorder>((states) {
    if (states.contains(MaterialState.disabled)) return disabled;
    if (states.contains(MaterialState.dragged)) return dragged;
    if (states.contains(MaterialState.error)) return error;
    if (states.contains(MaterialState.focused)) return focused;
    if (states.contains(MaterialState.hovered)) return hovered;
    if (states.contains(MaterialState.pressed)) return pressed;
    if (states.contains(MaterialState.selected)) return selected;

    return base;
  });
)

Implementation

NikuButton minimumSize(
  Size? base,
  Size? disabled,
  Size? dragged,
  Size? error,
  Size? focused,
  Size? hovered,
  Size? pressed,
  Size? selected,
) {
  this._minimumSize.update(
        base: base,
        disabled: disabled,
        dragged: dragged,
        error: error,
        focused: focused,
        hovered: hovered,
        pressed: pressed,
        selected: selected,
      );

  return this;
}