# SwipeProgress

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

<br />

```
@ExperimentalWearMaterialApi
class SwipeProgress<T : Any?>
```

<br />

*** ** * ** ***

Collects information about the ongoing swipe or animation in `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/swipeable.modifier#(androidx.compose.ui.Modifier).swipeable(androidx.wear.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.wear.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)`.

To access this information, use `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeableState#progress()`.

## Summary

| ### Public constructors |
|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#SwipeProgress(kotlin.Any,kotlin.Any,kotlin.Float)( from: T, to: T, fraction: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#toString()()` |

| ### Public properties |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#fraction()` The fraction that the current position represents between `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#from()` and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#to()`. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#from()` The state corresponding to the anchor we are moving away from. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#to()` The state corresponding to the anchor we are moving towards. |

## Public constructors

### SwipeProgress

```
<T : Any?> SwipeProgress(
    from: T,
    to: T,
    fraction: @FloatRange(from = 0.0, to = 1.0) Float
)
```

| Parameters |
|---|---|
| `from: T` | The state corresponding to the anchor we are moving away from. |
| `to: T` | The state corresponding to the anchor we are moving towards. |
| `fraction: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The fraction that the current position represents between `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#from()` and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#to()`. Must be between `0` and `1`. |

## Public functions

### equals

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

### hashCode

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

### toString

```
open fun toString(): String
```

## Public properties

### fraction

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

```
val fraction: @FloatRange(from = 0.0, to = 1.0) Float
```

The fraction that the current position represents between `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#from()` and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/SwipeProgress#to()`. Must be between `0` and `1`.

### from

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

```
val from: T
```

The state corresponding to the anchor we are moving away from.

### to

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

```
val to: T
```

The state corresponding to the anchor we are moving towards.