I'm new to coding. Can someone please explain to me why this code doesn't work? I'm trying to open a sheet when a button is tapped. The button is part of a Floating Action Button like in Gmail with multiple options. This 'SecondaryButton' is the options the user sees when the FAB is active.
Button(action: {
scanSheet.toggle()
}, label: {
//Scan Button
SecondaryButton(open: $open, icon: "camera.viewfinder", label: "Scan", color: "Blue", offsetY: -90)
.padding(.trailing, 40)
})
.sheet(isPresented: $scanSheet, content: {
Text("Hello")
})
scanSheet? And if you always want the sheet to open I would usescanSheet = true.