McEna
11/14/2023, 8:02 AMMainView.MyApp( {
if(it.isNotBlank()){
searchTerms.add(it)
viewModel.loadSearch(it)
} else {
searchTerms.clear()
}
}, {
MainView.Companion.ItemList(searchResult.data.results)
},
modifier = Modifier.semantics {
testTagsAsResourceId = true
}.testTag(ComposableIDs.searchRoot))
MainView.MyApp is the common scaffold. The modifier argument is applied there:
@Composable
fun MyApp(onSearch: (String) -> Unit, content: @Composable () -> Unit, modifier: Modifier = Modifier) {
MaterialTheme {
Scaffold(
topBar = {
TopBarWithSearch(onSearch)
},
modifier = modifier
) { _ ->
content()
}
}
}
So far my guess is, I may be missing some dependencies, but with the project structure being so different, I'm not sure which ones are relevant to this