# FixedThreshold

Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Swipeable.kt+class:androidx.compose.material.FixedThreshold) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0) Common/AllAndroid/JVM
- Cmn

  ```
  @ExperimentalMaterialApi
  data class FixedThreshold : ThresholdConfig
  ```

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

A fixed threshold will be at an `https://developer.android.com/reference/kotlin/androidx/compose/material/FixedThreshold#(androidx.compose.ui.unit.Dp)` away from the first anchor.

## Summary

| ### Public constructors |
|---|---|
| `[FixedThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FixedThreshold#FixedThreshold(androidx.compose.ui.unit.Dp))(offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density.[computeThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FixedThreshold#(androidx.compose.ui.unit.Density).computeThreshold(kotlin.Float,kotlin.Float))(fromValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, toValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

## Public constructors

### FixedThreshold

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.9.0) Deprecated in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.9.0)

```
[FixedThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FixedThreshold#FixedThreshold(androidx.compose.ui.unit.Dp))(offset: Dp)
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

| Parameters |
|---|---|
| `offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The offset (in dp) that the threshold will be at. |

## Public functions

### Density.computeThreshold

Cmn Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Swipeable.kt+function:computeThreshold)

```
open fun Density.[computeThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FixedThreshold#(androidx.compose.ui.unit.Density).computeThreshold(kotlin.Float,kotlin.Float))(fromValue: Float, toValue: Float): Float
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Compute the value of the threshold (in pixels), once the values of the anchors are known.