Last active
October 9, 2022 17:41
-
-
Save sergei-mikhailovskii-idf/a856d8fede2ac04e1c99c686964452bd 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
internal class SnackbarDelegate( | |
var snackbarHostState: SnackbarHostState? = null, | |
var coroutineScope: CoroutineScope? = null | |
) { | |
fun showSnackbar( | |
message: String, | |
actionLabel: String? = null, | |
duration: SnackbarDuration = SnackbarDuration.Short | |
) { | |
coroutineScope?.launch { | |
snackbarHostState?.showSnackbar(message, actionLabel, duration) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment