TextToggleButtonShapes

class TextToggleButtonShapes


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).

Summary

Public constructors

TextToggleButtonShapes(
    uncheckedShape: Shape,
    checkedShape: Shape?,
    uncheckedPressedShape: Shape?,
    checkedPressedShape: Shape?
)

Public functions

TextToggleButtonShapes
copy(
    uncheckedShape: Shape?,
    checkedShape: Shape?,
    uncheckedPressedShape: Shape?,
    checkedPressedShape: Shape?
)
open operator Boolean
equals(other: Any?)
open Int

Public properties

Shape?

the shape of the toggle button when checked and pressed

Shape?

the shape of the text toggle button when checked

Shape?

the shape of the toggle button when unchecked and pressed

Shape

the shape of the text toggle button when unchecked

Public constructors

TextToggleButtonShapes

Added in 1.0.0-alpha32
TextToggleButtonShapes(
    uncheckedShape: Shape,
    checkedShape: Shape? = null,
    uncheckedPressedShape: Shape? = null,
    checkedPressedShape: Shape? = uncheckedPressedShape
)
Parameters
uncheckedShape: Shape

the shape of the text toggle button when unchecked

checkedShape: Shape? = null

the shape of the text toggle button when checked

uncheckedPressedShape: Shape? = null

the shape of the toggle button when unchecked and pressed

checkedPressedShape: Shape? = uncheckedPressedShape

the shape of the toggle button when checked and pressed

Public functions

copy

Added in 1.0.0-alpha32
fun copy(
    uncheckedShape: Shape? = this.uncheckedShape,
    checkedShape: Shape? = this.checkedShape,
    uncheckedPressedShape: Shape? = this.uncheckedPressedShape,
    checkedPressedShape: Shape? = this.checkedPressedShape
): TextToggleButtonShapes

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

checkedPressedShape

Added in 1.0.0-alpha32
val checkedPressedShapeShape?

the shape of the toggle button when checked and pressed

checkedShape

Added in 1.0.0-alpha32
val checkedShapeShape?

the shape of the text toggle button when checked

uncheckedPressedShape

Added in 1.0.0-alpha32
val uncheckedPressedShapeShape?

the shape of the toggle button when unchecked and pressed

uncheckedShape

Added in 1.0.0-alpha32
val uncheckedShapeShape

the shape of the text toggle button when unchecked