Conditionally applying View Modifiers in SwiftUI

Oftentimes I get to a situation where I need to apply a View Modifier only if a certain condition is met. Achieving this - surprisingly - is not so easy in SwiftUI. Fortunately, we can make it much easier with one simple View extension. Imagine a screen like this... We have two Buttons and one Te…