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-alpha33
TextToggleButtonShapes(
    uncheckedShape: Shape,
    checkedShape: Shape = uncheckedShape,
    uncheckedPressedShape: Shape = uncheckedShape,
    checkedPressedShape: Shape = uncheckedPressedShape
)
Parameters
uncheckedShape: Shape

the shape of the text toggle button when unchecked

checkedShape: Shape = uncheckedShape

the shape of the text toggle button when checked

uncheckedPressedShape: Shape = uncheckedShape

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-alpha33
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-alpha33
val checkedPressedShapeShape

the shape of the toggle button when checked and pressed

checkedShape

Added in 1.0.0-alpha33
val checkedShapeShape

the shape of the text toggle button when checked

uncheckedPressedShape

Added in 1.0.0-alpha33
val uncheckedPressedShapeShape

the shape of the toggle button when unchecked and pressed

uncheckedShape

Added in 1.0.0-alpha33
val uncheckedShapeShape

the shape of the text toggle button when unchecked