I a simple Flutter web application with few routes (for e.g. /, /about-us, /product/{product_id}, etc.). I currently use python3 -m http.server --directory build/web --bind 0.0.0.0 to serve Flutter app.
I would like to insert route specific HTML tags - for e.g., to enable link preview generation, I would like to insert route specific Open Graph tags.
I understand that Flutter serves an SPA, but is there a way to inject custom HTML while serving different routes? For e.g, is it possible to write custom Python/NodeJS logic to figure out the route and modify HTML before we return it?
Thanks!