I'm currently working on a swift widget for my flutter app. When I add a Toggle to my widget and run it, I don't see any toggle.
struct MyWidgetEntryView : View {
@State private var on = true
var body: some View {
VStack(content: {
Text("I am title").font(.system(size: 20))
Text("I am text")
Toggle("I am toggle", isOn: $on)
})
}
it does show if I change the toggleStyle to .button
Toggle("I am toggle", isOn: $on).toggleStyle(.button)
I'm using swift 5.5.2 and running it on an iPhone 12 simulator.