Not able to achieve dark mode using SwiftUI

struct ContentView_Previews : PreviewProvider {
    static var previews: some View {
        ContentView().environment(\.colorScheme, .dark)
    }
}

I am using the above code to achieve dark mode on my demo project but its not working.
Any help or insight would be really appreciated.

Not able to achieve dark mode using SwiftUI