in nav2-usability/scenario_code/lib/dynamic-linking/router.dart [64:81]
Future<AppRoutePath> parseRouteInformation(
RouteInformation routeInformation) async {
final uri = Uri.parse(routeInformation.location!);
// Handle '/'
if (uri.pathSegments.isEmpty) {
return AppRoutePath();
}
// Handle '/wishlist/:id'
if (uri.pathSegments.length == 2) {
if (uri.pathSegments[0] != 'wishlist') return AppRoutePath();
final id = uri.pathSegments[1];
return AppRoutePath(id: id);
}
// Handle unknown routes
return AppRoutePath();
}