Swift, Swiftui, iOS App Development, Mobile App Development, Programming.
MainActorDataHandlerKey: EnvironmentKey { public static let defaultValue: @Sendable @MainActor () async -> DataHandler? = { nil } } ​ extension EnvironmentValues { public var createDataHandlerWithMainContext: @Sendable @MainActor () async -> DataHandler? { get { self[MainActorDataHandlerKey.self] }