JCB - Scaffold SnackbarHost

PHOTO EMBED

Mon Sep 06 2021 06:37:00 GMT+0000 (UTC)

Saved by @GoodRequest. #kotlin

val scope = rememberCoroutineScope()
val scaffoldState = rememberScaffoldState()
.
.
.
scaffoldState = scaffoldState,
floatingActionButton = {
    FloatingActionButton(
        onClick = {
            scope.launch {
                scaffoldState.snackbarHostState.showSnackbar("Hello there!")
            }
        },
        content = {
            Icon(imageVector = Icons.Default.Favorite, contentDescription = "")
        }
    )
}
content_copyCOPY