- 
                Notifications
    
You must be signed in to change notification settings  - Fork 47
 
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Pre-requisites:
- Yes, I looked through both open and closed issues looking for what I needed.
 - No, I did not find what I was looking for.
 
Expected Behavior
The status bar color scheme should not be changed after toast dismissed
Current Behavior
The status bar is in dark content when the app is running on dark mode with a light background.
When the toast is shown, the status bar changes to light content
Steps to Reproduce
Simulator.Screen.Recording.-.iPhone.XR.-.2024-08-12.at.15.22.52.mp4
struct TestView: View {
    @State private var isLoading: Bool = false
    var body: some View {
        VStack {
            Button {
                isLoading = true
            } label: {
                Text("Hello World")
                    .padding()
            }
        }
        .toast(isPresented: $isLoading, dismissAfter: 2) {
            ToastView("Loading").toastViewStyle(.indeterminate)
        }
        .frame(
            minWidth: 0,
            maxWidth: .infinity,
            minHeight: 0,
            maxHeight: .infinity,
            alignment: .topLeading
        )
        .background(Color.white.ignoresSafeArea())
        .preferredColorScheme(.dark)
    }
}Context
I want to keep the status bar color scheme after toast was dismissed.
Your Environment
- Swift Version: 5
 - Xcode Version: 15.3
 - Operating System Version: 14.3.1
 - Device or Simulator: iOS 16 (dark mode)
 
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed