It is possible to set the button style this way...?
Button() { }
.buttonStyle(.default)
Instead of this...?
Button() { }
.buttonStyle(DefaultButtonStyle())
I tried to code an extension but it doesn't work.
extension ButtonStyle {
static var `default`: DefaultButtonStyle {
DefaultButtonStyle()
}
}
It says: Static member 'default' cannot be used on protocol metatype 'ButtonStyle.Protocol'