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(
    unchecked: Shape,
    checked: Shape?,
    uncheckedPressed: Shape?,
    checkedPressed: Shape?
)

Public functions

TextToggleButtonShapes
copy(
    unchecked: Shape,
    checked: Shape?,
    uncheckedPressed: Shape?,
    checkedPressed: Shape?
)
open operator Boolean
equals(other: Any?)
open Int

Public properties

Shape?

the shape of the text toggle button when checked

Shape?

the shape of the toggle button when checked and pressed

Shape

the shape of the text toggle button when unchecked

Shape?

the shape of the toggle button when unchecked and pressed

Public constructors

TextToggleButtonShapes

Added in 1.0.0-alpha30
TextToggleButtonShapes(
    unchecked: Shape,
    checked: Shape? = null,
    uncheckedPressed: Shape? = null,
    checkedPressed: Shape? = uncheckedPressed
)
Parameters
unchecked: Shape

the shape of the text toggle button when unchecked

checked: Shape? = null

the shape of the text toggle button when checked

uncheckedPressed: Shape? = null

the shape of the toggle button when unchecked and pressed

checkedPressed: Shape? = uncheckedPressed

the shape of the toggle button when checked and pressed

Public functions

copy

Added in 1.0.0-alpha30
fun copy(
    unchecked: Shape = this.unchecked,
    checked: Shape? = this.checked,
    uncheckedPressed: Shape? = this.uncheckedPressed,
    checkedPressed: Shape? = this.checkedPressed
): TextToggleButtonShapes

equals

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

hashCode

open fun hashCode(): Int

Public properties

checked

Added in 1.0.0-alpha30
val checkedShape?

the shape of the text toggle button when checked

checkedPressed

Added in 1.0.0-alpha30
val checkedPressedShape?

the shape of the toggle button when checked and pressed

unchecked

Added in 1.0.0-alpha30
val uncheckedShape

the shape of the text toggle button when unchecked

uncheckedPressed

Added in 1.0.0-alpha30
val uncheckedPressedShape?

the shape of the toggle button when unchecked and pressed