-
public final class SnackbarHostStateKt
-
-
Method Summary
Modifier and Type Method Description final static UnitSnackbarHost(SnackbarHostState hostState, Modifier modifier, Function1<SnackbarData, Unit> snackbar)Host for Snackbars to be used in Scaffold to properly show, hide and dismiss items based on material specification and the hostState. -
-
Method Detail
-
SnackbarHost
@Composable() final static Unit SnackbarHost(SnackbarHostState hostState, Modifier modifier, Function1<SnackbarData, Unit> snackbar)
Host for Snackbars to be used in Scaffold to properly show, hide and dismiss items based on material specification and the hostState.
This component with default parameters comes build-in with Scaffold, if you need to show a default Snackbar, use use ScaffoldState.snackbarHostState and SnackbarHostState.showSnackbar.
- Parameters:
hostState- state of this component to read and show Snackbars accordinglymodifier- optional modifier for this componentsnackbar- the instance of the Snackbar to be shown at the appropriate time with appearance based on the SnackbarData provided as a param
-
-
-
-