Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose all public ModalBottomSheetState and SwipeProgress properties in BottomSheetNavigatorState #719

Merged
merged 1 commit into from Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions navigation-material/api/current.api
Expand Up @@ -25,12 +25,18 @@ package com.google.accompanist.navigation.material {
@com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi public final class BottomSheetNavigatorSheetState {
ctor public BottomSheetNavigatorSheetState(androidx.compose.material.ModalBottomSheetState sheetState);
method public androidx.compose.material.ModalBottomSheetValue getCurrentValue();
method public float getDirection();
method public androidx.compose.runtime.State<java.lang.Float> getOffset();
method public androidx.compose.runtime.State<java.lang.Float> getOverflow();
method public androidx.compose.material.SwipeProgress<androidx.compose.material.ModalBottomSheetValue> getProgress();
method public androidx.compose.material.ModalBottomSheetValue getTargetValue();
method public boolean isVisible();
property public final androidx.compose.material.ModalBottomSheetValue currentValue;
property public final float direction;
property public final boolean isVisible;
property public final androidx.compose.runtime.State<java.lang.Float> offset;
property public final androidx.compose.runtime.State<java.lang.Float> overflow;
property public final androidx.compose.material.SwipeProgress<androidx.compose.material.ModalBottomSheetValue> progress;
property public final androidx.compose.material.ModalBottomSheetValue targetValue;
}

Expand Down
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.ModalBottomSheetState
import androidx.compose.material.ModalBottomSheetValue
import androidx.compose.material.SwipeProgress
import androidx.compose.material.SwipeableDefaults
import androidx.compose.material.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -74,6 +75,24 @@ public class BottomSheetNavigatorSheetState(private val sheetState: ModalBottomS
*/
public val offset: State<Float>
get() = sheetState.offset

/**
* @see ModalBottomSheetState.overflow
*/
public val overflow: State<Float>
get() = sheetState.overflow

/**
* @see ModalBottomSheetState.direction
*/
public val direction: Float
get() = sheetState.direction

/**
* @see ModalBottomSheetState.progress
*/
public val progress: SwipeProgress<ModalBottomSheetValue>
get() = sheetState.progress
}

/**
Expand Down