environment
The environment associated with the graphics context.
Declaration
var environment: EnvironmentValues { get }Discussion
SwiftUI initially sets this to the environment of the context’s enclosing view. The context uses values like display resolution and the color scheme from the environment to resolve types like Image and Color. You can also access values stored in the environment for your own purposes.