Last active
October 9, 2022 17:23
-
-
Save sergei-mikhailovskii-idf/2ccc52c474ac82fdc8ae355ea535b5bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun SnackbarDemo() { | |
val scaffoldState: ScaffoldState = rememberScaffoldState() | |
Scaffold(scaffoldState = scaffoldState) { | |
Button(onClick = { | |
scaffoldState.snackbarHostState.showSnackbar( | |
message = "This is your message", | |
actionLabel = "Do something" | |
) | |
}) { | |
Text(text = "Click me!") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment