Testing Responsive Layouts in Chrome (Flutter Web)
By Engineering Team•October 11, 2026•2 min read
Installing Flutter SDK (macOS) already covers running the app with flutter run -d chrome. That alone renders at your desktop browser’s window size — this page covers the extra step to preview it at an actual phone-sized viewport, which is the faster option for a quick layout check without booting an emulator.
1. Run on the Chrome Target
flutter run -d chrome
2. Switch to a Mobile Viewport
- Right-click anywhere on the running page and choose Inspect to open Chrome DevTools.
- Click the Toggle device toolbar icon (or press
Cmd+Shift+Mon Mac). - Pick a device preset (e.g. Pixel, iPhone) from the toolbar dropdown to preview at that screen size.
3. Iterate
Hot reload still works the same way — save a .dart file and the browser updates in place, including inside the device toolbar view.
When This Isn’t Enough
The device toolbar simulates viewport size and user-agent, not real mobile behavior (touch gestures, platform-specific widgets, actual GPU rendering). For anything beyond a layout check, use a real target: