Moreover, I noticed that we can remove PrefersTabNavigationEnvironmentKey too
The code will become:
extension EnvironmentValues {
var prefersTabNavigation: Bool {
get { UIDevice.current.userInterfaceIdiom == .phone || UIDevice.current.userInterfaceIdiom == .tv }
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: