Extension function to apply changes to a Modifier if a predicate is matched.
Modifier with or without changes depending on the predicate
which should be matched
apply changes to the given Modifier