In SwiftUI I need to make the statusbar content (time, battery) white without any background color, only the image I specified for the view is behind it. The ideal way would be to use .toolbarColorScheme and do this:
.toolbarColorScheme(.dark, for: .navigationBar) .toolbarBackground(Color.white.opacity(0), for: .navigationBar) .toolbarBackground(.hidden, for: .navigationBar)
However, .toolbarColorScheme with a .dark value always automatically has a dark colored material background and can't be used without it. Is there any way to still use it and remove the dark background? (for instance with introspect)
After trying many different other ways, none of them worked without breaking something else. I also can't use .preferredColorScheme because then I can't make the smooth transitions work between the main view where the statusbar content needs to be dark and the detail view where the statusbar content needs to be white.