TextToggleButtonShapes

Class

Android
public class TextToggleButtonShapes(
    public val uncheckedShape: Shape,
    public val checkedShape: Shape = uncheckedShape,
    public val uncheckedPressedShape: Shape = uncheckedShape,
    public val checkedPressedShape: Shape = uncheckedPressedShape,
)

Represents the shapes used for TextToggleButton in various states.

TextToggleButtonShapes offers flexibility in shape-morphing the TextToggleButton according to the checked and pressed states. See TextToggleButtonDefaults.shapes (which maintains a fixed shape for all states), TextToggleButtonDefaults.animatedShapes (which applies a shape-morph when pressed) and TextToggleButtonDefaults.variantAnimatedShapes (which applies different shapes for checked/unchecked and an additional morph to the current shape when pressed).

Parameters

uncheckedShapethe shape of the text toggle button when unchecked
checkedShapethe shape of the text toggle button when checked
uncheckedPressedShapethe shape of the toggle button when unchecked and pressed
checkedPressedShapethe shape of the toggle button when checked and pressed

Functions

public fun copy(
        uncheckedShape: Shape? = this.uncheckedShape,
        checkedShape: Shape? = this.checkedShape,
        uncheckedPressedShape: Shape? = this.uncheckedPressedShape,
        checkedPressedShape: Shape? = this.checkedPressedShape,
    ): TextToggleButtonShapes