Function

calculateEndPadding

The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

calculateEndPadding

Common
fun PaddingValues.calculateEndPadding(layoutDirection: LayoutDirection) =
    if (layoutDirection == LayoutDirection.Ltr) {
        calculateRightPadding(layoutDirection)
    } else {
        calculateLeftPadding(layoutDirection)
    }

The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL.