Skip to content

Instantly share code, notes, and snippets.

@Debdutta-Panda
Created June 22, 2022 18:16
Show Gist options
  • Select an option

  • Save Debdutta-Panda/6e3c87fef1cf40d3d09ba63374c728ef to your computer and use it in GitHub Desktop.

Select an option

Save Debdutta-Panda/6e3c87fef1cf40d3d09ba63374c728ef to your computer and use it in GitHub Desktop.
Put these code at the very first of your composbale function
val owner = LocalLifecycleOwner.current
val context = LocalContext.current
LaunchedEffect(key1 = vm.uiScope.value){
vm.uiScope.forward(
ScopeManager(
navHostController = navController,
owner = owner,
toaster = Toaster(context)
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment