Skip to content

Instantly share code, notes, and snippets.

@alexvanyo
Last active January 14, 2022 20:36
Show Gist options
  • Save alexvanyo/5a65724dbc2f0a07794f69f7022fcf0b to your computer and use it in GitHub Desktop.
Save alexvanyo/5a65724dbc2f0a07794f69f7022fcf0b to your computer and use it in GitHub Desktop.
Usage of notifyInput in HomeListWithArticleDetailScreen
// Copyright 2022 Google LLC.
// SPDX-License-Identifier: Apache-2.0
@Composable
fun HomeListWithArticleDetailsScreen(
onInteractWithList: () -> Unit,
onInteractWithDetail: (String) -> Unit,
// ...
) {
Row {
PostList(
modifier = Modifier.notifyInput {
onInteractWithList()
},
// ...
)
PostContent(
modifier = Modifier.notifyInput {
onInteractWithDetail(detailArticle.id)
},
// ...
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment