routeExists method
Implementation
bool routeExists(BuildContext context, String route) {
try {
return GoRouter.of(context)
.routeInformationParser
.configuration
.findMatch(route)
.matches
.isNotEmpty;
} catch (err) {
return false;
}
}