setParentRoute method
- String? route
Set the parent route of the current route.
This will show a back button in the title bar and navigate to the parent route when pressed if set.
Implementation
void setParentRoute(String? route) {
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {
_parentRoute = route;
});
});
}