Travis Griggs
02/26/2021, 8:51 PMsupportFragmentManager.commit {
...
}
When I see this pattern, I think "trailing closure syntax". On closer examination, I realized that this
in said closure-esque body wasn't what I thought it was, so I went and found the method signature for FragmentManager.commit...
FragmentManager.commit(allowStateLoss: Boolean = false, body: FragmentTransaction.() -> Unit
I know that () -> Unit is a nullary closure, but what does it mean when I see the above? ClassName.() -> Unit?Zach Klippenstein (he/him) [MOD]
02/26/2021, 8:52 PMTravis Griggs
02/27/2021, 3:58 AMZach Klippenstein (he/him) [MOD]
02/27/2021, 5:08 PM