elevation method

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

Apply elevation to button

Equivalent to

TextButton(
  elevation: MaterialStateProperty.resolveWith<T>((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 elevation({
  double? base,
  double? disabled,
  double? dragged,
  double? error,
  double? focused,
  double? hovered,
  double? pressed,
  double? selected,
}) {
  this._elevation.update(
        base: base,
        disabled: disabled,
        dragged: dragged,
        error: error,
        focused: focused,
        hovered: hovered,
        pressed: pressed,
        selected: selected,
      );

  return this;
}