Skip to content

Instantly share code, notes, and snippets.

@vinaygaba
Created May 25, 2022 04:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinaygaba/3919fe1738f1985850e11121ab84f2ed to your computer and use it in GitHub Desktop.
Save vinaygaba/3919fe1738f1985850e11121ab84f2ed to your computer and use it in GitHub Desktop.
inline fun Modifier.ifTrue(predicate: Boolean, builder: () -> Modifier) =
then(if (predicate) builder() else Modifier)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment