# IconToggleButtonShapes

# IconToggleButtonShapes

Artifact:[androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/IconToggleButton.kt+class:androidx.wear.compose.material3.IconToggleButtonShapes)  
Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

<br />

```
class IconToggleButtonShapes
```

<br />

*** ** * ** ***

Represents the shapes used for[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))in various states.

[IconToggleButtonShapes](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes)offers flexibility in shape-morphing the IconToggleButton according to the checked and pressed states. See[IconToggleButtonDefaults.shapes](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonDefaults#shapes())(which maintains a fixed shape for all states),[IconToggleButtonDefaults.animatedShapes](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonDefaults#animatedShapes())(which applies a shape-morph when pressed) and[IconToggleButtonDefaults.variantAnimatedShapes](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonDefaults#variantAnimatedShapes())(which applies different shapes for checked/unchecked and an additional morph to the current shape when pressed).

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IconToggleButtonShapes](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#IconToggleButtonShapes(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape))`(` ` uncheckedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`,` ` checkedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`,` ` uncheckedPressedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`,` ` checkedPressedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape) `)` |

|                                                      ### Public functions                                                       |
|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IconToggleButtonShapes](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes) | [copy](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#copy(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape))`(` ` uncheckedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`?,` ` checkedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`?,` ` uncheckedPressedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`?,` ` checkedPressedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)`?` `)` |
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                             | [equals](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                              | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#hashCode())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

|                                   ### Public properties                                    |
|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape) | [checkedPressedShape](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#checkedPressedShape()) the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when checked and pressed       |
| [Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape) | [checkedShape](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#checkedShape()) the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when checked                                 |
| [Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape) | [uncheckedPressedShape](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#uncheckedPressedShape()) the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when unchecked and pressed |
| [Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape) | [uncheckedShape](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/IconToggleButtonShapes#uncheckedShape()) the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when unchecked                           |

## Public constructors

### IconToggleButtonShapes

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)  

```
IconToggleButtonShapes(
    uncheckedShape: Shape,
    checkedShape: Shape = uncheckedShape,
    uncheckedPressedShape: Shape = uncheckedShape,
    checkedPressedShape: Shape = uncheckedPressedShape
)
```  

|                                                                 Parameters                                                                  |
|---------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `uncheckedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)                                | the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when unchecked             |
| `checkedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` = uncheckedShape`               | the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when checked               |
| `uncheckedPressedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` = uncheckedShape`      | the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when unchecked and pressed |
| `checkedPressedShape: `[Shape](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` = uncheckedPressedShape` | the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when checked and pressed   |

## Public functions

### copy

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)  

```
fun copy(
    uncheckedShape: Shape? = this.uncheckedShape,
    checkedShape: Shape? = this.checkedShape,
    uncheckedPressedShape: Shape? = this.uncheckedPressedShape,
    checkedPressedShape: Shape? = this.checkedPressedShape
): IconToggleButtonShapes
```  

### equals

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

### hashCode

```
open fun hashCode(): Int
```  

## Public properties

### checkedPressedShape

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)  

```
val checkedPressedShape: Shape
```

the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when checked and pressed  

### checkedShape

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)  

```
val checkedShape: Shape
```

the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when checked  

### uncheckedPressedShape

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)  

```
val uncheckedPressedShape: Shape
```

the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when unchecked and pressed  

### uncheckedShape

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)  

```
val uncheckedShape: Shape
```

the shape of the[IconToggleButton](https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#IconToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.IconToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.IconToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1))when unchecked