Issue
I am new to Kotlin and I have question as I dont fully understand the principle of Unit:
onChecked:(Boolean) -> Unit
Does it pass the certain data as parameter to other function ( as a Unit)?
Solution
(Boolean) -> Unit
is a function type. Before the arrow are the parameters, in this case a Boolean
and after the arrow is the return type. Unit
simply means that it doesn't return anything.
See also this documentation
Answered By - Ivo Beckers
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.