Source set: Common
class ToggleButtonShapes(val shape: Shape, val pressedShape: Shape, val checkedShape: Shape)
The shapes that will be used in toggle buttons. Toggle button will morph between these three shapes depending on the interaction of the toggle button, assuming all of the shapes are CornerBasedShapes.
Functions
copy
fun copy(
shape: Shape? = this.shape,
pressedShape: Shape? = this.pressedShape,
checkedShape: Shape? = this.checkedShape,
) =
ToggleButtonShapes(
shape = shape.takeOrElse { this.shape },
pressedShape = pressedShape.takeOrElse { this.pressedShape },
checkedShape = checkedShape.takeOrElse { this.checkedShape },
)
Returns a copy of this ToggleButtonShapes with optionally overridden shapes.
Passing null for any shape parameter retains the current value from this instance.
Parameters
| shape | unchecked shape, or null to keep the current unchecked shape |
| pressedShape | pressed shape, or null to keep the current pressed shape |
| checkedShape | checked shape, or null to keep the current checked shape |