Before I back to the previous screen, is it possible to get this back name and conditional execute the needed method call?
Before I back to the previous screen, is it possible to get this back name and conditional execute the needed method call?
if you use Get, you can get previous route name directly by Get.previousRoute.
It implements this by a NavigatorObserver (lib/get_navigation/src/routes/observers/route_observer.dart)(https://api.flutter.dev/flutter/widgets/NavigatorObserver-class.html). You can also implement your own observer and maintain the route history.