Last active
January 14, 2022 20:36
-
-
Save alexvanyo/5a65724dbc2f0a07794f69f7022fcf0b to your computer and use it in GitHub Desktop.
Usage of notifyInput in HomeListWithArticleDetailScreen
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
// 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