Swift, Swiftui, iOS App Development, Mobile App Development, Programming.
} detail: { Text("Select an item") } } ​ @MainActor private func addItem() { let createDataHandler = createDataHandler Task.detached { if let dataHandler = await createDataHandler() { try await dataHandler.newItem(date: .now) } } } } Key Points Summary: Use @Environment(\.createDataHandler) to