Your First iOS & SwiftUI App: Polishing the App, Episode 21: Environment Property Wrapper | raywenderlich.com

Learn how you can use the environment property wrapper to detect if the app is in light mode or dark mode.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/28797859-your-first-ios-swiftui-app-polishing-the-app/lessons/21

After supporting dark mode with the environment variable, Ray forgets to add the multiplier of 0.8 to the opacity start color. So it goes from 0.3 * 0.8 to just 0.3 in light mode.