Object

SwipeableDefaults

Contains useful defaults for swipeable and SwipeableState.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
@ExperimentalWearMaterialApi
public object SwipeableDefaults

Contains useful defaults for swipeable and SwipeableState.

Functions

resistanceConfig

public fun resistanceConfig(
        anchors: Set<Float>,
        factorAtMin: Float = StandardResistanceFactor,
        factorAtMax: Float = StandardResistanceFactor,
    ): ResistanceConfig?

The default resistance config used by swipeable.

This returns null if there is one anchor. If there are at least two anchors, it returns a ResistanceConfig with the resistance basis equal to the distance between the two bounds.