Daniel Rampelt
05/27/2021, 2:18 PMColton Idle
05/27/2021, 5:36 PMZhelyazko Atanasov
05/27/2021, 5:56 PMeventContent
callback as:
eventContent: @Composable (event: Event) -> Unit = { BasicEvent(event = it) }
As outlined in the API Guideline for Compose, you can add one more input argument to eventContent
- a Modifier
and then pass it down to `BasicEvent`:
eventContent: @Composable (event: Event, modifier: Modifier) -> Unit = { event, modifier ->
BasicEvent(event, modifier)
}
If you decide to call another composable instead of the BasicEvent
, it's enough for it to properly handle the passed Modifier
🙂 Then you won't need the Box
wrapper. But then again... having a wrapper shouldn't be such big issue with Compose.
Sorry if I misunderstood your issue. If so, please forgive me 🙂Daniel Rampelt
05/27/2021, 9:06 PMmodifier
. But that's good to see it's expected in the API guidelinesHalil Ozercan
05/28/2021, 12:47 PM