Make widget data commit to sendable

This commit is contained in:
david-swift 2024-09-29 18:56:05 +02:00
parent cd4e4dff9d
commit ebb68009ee

View File

@ -6,16 +6,16 @@
// //
/// Data passed to widgets when initializing or updating the container. /// Data passed to widgets when initializing or updating the container.
public struct WidgetData { public struct WidgetData: Sendable {
/// The view modifiers. /// The view modifiers.
public var modifiers: [(AnyView) -> AnyView] = [] public var modifiers: [@Sendable (AnyView) -> AnyView] = []
/// The scene storage of the parent scene element. /// The scene storage of the parent scene element.
public var sceneStorage: SceneStorage public var sceneStorage: SceneStorage
/// The app storage of the parent app. /// The app storage of the parent app.
public var appStorage: any AppStorage public var appStorage: any AppStorage
/// Fields for custom data. /// Fields for custom data.
public var fields: [String: Any] = [:] public var fields: [String: Sendable] = [:]
/// Modify the data so that there are no modifiers. /// Modify the data so that there are no modifiers.
public var noModifiers: Self { public var noModifiers: Self {