I want to persist the preferences user selected via AppStorage, however if I change the @State
to @AppStorage
, the UI will stuck after the toggling.
To reproduce the problem, change the isOn1
in AccountsScreen
to :
struct AccountsScreen: View {
@AppStorage("isOn1") private var isOn1 = true
....
}
then start the application, the first time toggle the "Permissions" is ok, but if trying to toggle it the second time, it just won't work and the toggle of "Permission" is stuck.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too