borderSide method

NikuButton borderSide({
  1. BorderSide? base,
  2. BorderSide? disabled,
  3. BorderSide? dragged,
  4. BorderSide? error,
  5. BorderSide? focused,
  6. BorderSide? hovered,
  7. BorderSide? pressed,
  8. BorderSide? selected,
})

Apply styling to border

Equivalent to

TextButton(
  border: 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 borderSide({
  BorderSide? base,
  BorderSide? disabled,
  BorderSide? dragged,
  BorderSide? error,
  BorderSide? focused,
  BorderSide? hovered,
  BorderSide? pressed,
  BorderSide? selected,
}) {
  this._side.update(
        base: base,
        disabled: disabled,
        dragged: dragged,
        error: error,
        focused: focused,
        hovered: hovered,
        pressed: pressed,
        selected: selected,
      );

  return this;
}