private struct ScreamAtMeKey: EnvironmentKey { static let defaultValue = false } // Set via .environent(\.screamAtMe, true) extension EnvironmentValues { var screamAtMe: Bool { get { self[ScreamAtMeKey.self] } set { self[ScreamAtMeKey.self] = newValue } } } // Set via .screamAtMe(true) extension View { func screamAtMe(_ aaaaaah: Bool) -> some View { environment(.screamAtMe, aaaaaah) } }