📚 Encyclopedia

Flutter & Mobile · updated 2026-10-13

Serving a phone-friendly Flutter web app from the same URL

flutter-webmobile-webresponsivefullscreenorientationuser-agenttesting

Run (a Flutter/Flame game) was asked to give phone browsers "a mobile-friendly version at the same URL, exact same game" (tldr post #1571, 2026-08). The approach that worked: one shared engine, a separate mobile UI shell chosen at runtime, landscape-only gameplay, editors left on desktop.

Detecting "mobile" correctly

Routing

Small builder functions (buildHomeScreen(), buildLevelSelectScreen()) return the mobile or desktop screen; main.dart and in-game navigation call them. Same URL, purely client-side. Screens that were already list-based and adaptive are reused as-is.

Fullscreen and orientation on the web

Testing gotchas

See also

Linked from

Sources: run memory (mobile-shell.md), tldr post #1571