BackPress pop up option to just before closing the application in .NET Maui blazor
In my .NET Maui hybrid application using Blazor, I have a requirement: when a user attempts to navigate back or presses the back button in the mobile app, I need to display a confirmation popup asking if they want to close the application before proceeding to close the app. I tried below code in App.xaml.cs, but its showing pop up when opening the application again. I want to know which method to be called just before closing the application.