Skip to content

Flutter web: redirect to an external URL

Did you know?

With Flutter web, you can redirect the user to an external page by changing the window href property.

Very handy for checkout pages (e.g. Stripe).


Note that dart:html can’t be imported if you’re targeting mobile or desktop.

To work around that, you can use conditional imports.

More info here: 👇

Previous Next
VSCode Quick Fix: Create constructor for final fields, required named

Last update: 18 septembre 2023
Created: 18 septembre 2023