extractRouteName function
Extracts the name of a route based on it's instance type or null if not possible.
Implementation
String? extractRouteName(Route? route) {
if (route?.settings.name != null) {
return route!.settings.name;
}
if (route is SintPageRoute) {
return route.routeName;
}
if (route is SintDialogRoute) {
return 'DIALOG ${route.hashCode}';
}
if (route is SintModalBottomSheetRoute) {
return 'BOTTOMSHEET ${route.hashCode}';
}
return null;
}