buttonBackground static method

ButtonLayerBuilder buttonBackground(
  1. LiquidGlassStyle styleOf(
    1. Set<WidgetState> states
    )
)

Stands a button's content on glass, for a button with no fill.

Implementation

static ButtonLayerBuilder buttonBackground(
  LiquidGlassStyle Function(Set<WidgetState> states) styleOf,
) {
  return (context, states, child) => LiquidGlass(
    style: styleOf(states),
    pressed: states.contains(WidgetState.pressed),
    child: child,
  );
}