Skip to content

Instantly share code, notes, and snippets.

@Ahmed-Sellami
Created Aug 24, 2021
Embed
What would you like to do?
/* ... */
val shoesArticles = remember { mutableStateListOf<ShoesArticle>() }
val isVisibleStates = remember {
mutableStateMapOf<ShoesArticle, Boolean>()
.apply {
shoesArticles.map { shoesArticle ->
shoesArticle to false
}.toMap().also {
putAll(it)
}
}
}
Scaffold(
topBar = {
Box {
Particle(
modifier = Modifier
.align(Alignment.BottomCenter),
isFired = isFired,
color = particleColor,
onCompleteAnim = {
isVisibleStates[addedArticle] = true
isFired = false
}
)
/* ... */
}
}
) { innerPadding ->
ShoesList(
modifier = Modifier.padding(innerPadding),
isVisibleStates = isVisibleStates,
shoesArticles = shoesArticles
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment