Created
October 9, 2022 18:24
-
-
Save sergei-mikhailovskii-idf/dd607cc27cd3f1ef487383b8993bf039 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
fun FitnestApp() { | |
val snackbarDelegate: SnackbarDelegate by rememberInstance() | |
val scaffoldState = rememberScaffoldState() | |
snackbarDelegate.apply { | |
snackbarHostState = scaffoldState.snackbarHostState | |
coroutineScope = rememberCoroutineScope() | |
} | |
FitnestTheme { | |
Scaffold( | |
scaffoldState = scaffoldState, | |
snackbarHost = { | |
SnackbarHost(hostState = it) { | |
val backgroundColor = snackbarDelegate.snackbarBackgroundColor | |
Snackbar(snackbarData = it, backgroundColor = backgroundColor) | |
} | |
} | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment