`@Composable fun onDispose(callback: () -> Unit...
# compose
l
@Composable fun onDispose(callback: () -> Unit)
will this accept a
@Composable
which actually returns a value now? Something like:
@Composable fun disposeEverything() : Boolean
?
l
Can you clarify? I don't understand the question...
l
Sure:
onDispose
accept a parameter of type
() -> Unit
, and I guess many other functions as well. Now I can define any composable function to be
@Composable fun myFunc() : A
- so to have a return type different from
Unit
Would
myFunc
be accepted as the parameter inside the
onDispose
or whatever other function that has the signature with
() -> Unit
?