Good afternoon and thanks for this amazing package. I came across a small error, I can not get the view to be updated when I reset the value to default. When I close the application and open it again, I see that the value is written and is equal to the default.
class SessionStore: ObservableObject {
@Default(.loginModel) var loginModel
}
extension Defaults.Keys {
static let loginModel = Key<LoginModel?>("loginModel", default: nil)
}
Button(action: {
sessionStore.loginModel = nil
}) {
HStack {
Image(systemName: "flame")
.frame(width: 24)
Text("Выйти из аккаунта")
}.foregroundColor(.red)
}
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