9.4 C
New York
Saturday, December 2, 2023

How to run Flutter web with a custom port

By default, each time you start Flutter web on localhost it will have a different port. However, there are cases where you need to set up a fixed port (like when you want to implement social auth with Google Sign In). To do that, use the –web-port flag when running your project like so:

flutter run -d chrome --web-port=10000

Screenshot:Advertisements

That’s it. Further reading:

You can also take a tour around our Flutter topic page and Dart topic page to see the latest tutorials and examples.

Advertisements

Related Articles

Latest Articles