Flutter Web app on mobile browser test

CodingWithTashi
2 min readJul 20, 2021

--

In this short post we will see how you can access your flutter localhost app from real mobile browser.

Photo by Richy Great on Unsplash

First thing first, make sure you have the flutter web up and running in your flutter application.

And your device that is browser is running (can be window, mac etc.) should be connected to same network as mobile device is connected.

In my case both are connected to same network Wi-Fi. You should do the same.

Now let's start.

  1. Open your project in your favorite ide but this time instead of using flutter run execute this line in your project terminal.
flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0

Okay your project will run after some time. you can go to your web browser and check localhost:8080 whether it is running or not.

2. But to make it work in your mobile browser. you need to get your IP address first. to get IP

Open cmd->type ipconfig->copy IP address

Okay Open your mobile browser and type:

http://<your-ip>:8080

You will see your project up and running. That all.

Thanks

--

--