DynamicUI icon indicating copy to clipboard operation
DynamicUI copied to clipboard

Update `DynamicUIModifier` in a way that `AnyView` is not required anymore.

Open 0xWDG opened this issue 2 months ago • 0 comments

deally, this function would use @ViewBuilder to avoid type erasure with AnyView, which would improve type safety and allow for more natural SwiftUI composition. However, applying modifiers dynamically based on a dictionary of keys and values currently requires type erasure, since @ViewBuilder expects a static view hierarchy.

https://github.com/0xWDG/DynamicUI/blob/main/Sources/DynamicUI/Extensions/View.modifiers.swift#L17-L112

0xWDG avatar Oct 27 '25 15:10 0xWDG