My expectation: I want to open a new full screen view (PhoneNumberView) on click of confirmation dialog button. Reality: Nothing happens when I click to Back button (please check my code below)
Here is my code:
SetPasswordButton(value: "exitButton",
password: $password,
key: $key,
unlocked: $unlocked,
repeatPassword: $repeatPassword, isExitButtonTapped: $isExitButtonTapped)
.confirmationDialog("", isPresented: $isExitButtonTapped) {
Button("Back", role: .destructive) {
goToPhoneScreen = true
}
.fullScreenCover(isPresented: $goToPhoneScreen {
PhoneNumberView()
}
Button("Cancel", role: .cancel) {}
}
Could you help me?