Flutter Question: I am trying to implement an alert dialog on my Cupertino Navigation bar back button when pressed, but I think I have no idea how this would work when I'm not using a custom back button.
Does anyone have an idea?
class ameriCares extends StatelessWidget {
const ameriCares({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(middle: Text("Americares")), //i want to add the alert dialog here on the back button
child: SafeArea(
child: WebView(
initialUrl: AppLocalizations.of(context)!.americares,
javascriptMode: JavascriptMode.unrestricted,
),
//bottomNavigationBar: CustomBottomNavBar(selectedMenu: MenuState.give),
),
);
}
}
Thanks a million