https://kotlinlang.org logo
#compose
Title
# compose
c

chanjungskim

03/07/2023, 1:39 AM
Is there any capsulation for compose?
Copy code
@Composable
fun NumberPad(
    modifier: Modifier
) {
    @Composable
    fun NumberPadButton(
        text: String,
        onClick: () -> Unit = {},
        modifier: Modifier
    ) {
        // TODO: 
    }
    // TODO:
}
internal function would be the one I am looking for, but does it look fine or is this fine?
c

Chris Fillmore

03/07/2023, 2:07 AM
Why not just have a private top-level function?
j

jw

03/07/2023, 4:03 AM
Try it. If it doesn't work file a bug.
c

chanjungskim

03/07/2023, 4:04 AM
Internal function works but the parent function becomes long so..
5 Views