I'm trying to create a SwiftUI extension on Text that allows me to apply custom attributes, similar to how we use NSAttributedString in UIKit. Ideally, I want to write something like this:
public extension Text {
func applyAttributes(_ myCustomAttributes: [NSAttributedString.Key: Any]) -> some View {
let text = NSAttributedString(
string: self.textValue, //