CesiumJS not loading properly inside Flutter WebView

Hi everyone,

I’m trying to integrate CesiumJS inside a Flutter WebView for a mobile application.
However, the Cesium globe doesn’t load — the WebView just shows a blank screen (no globe, no tiles).

Here’s what I’ve tried so far:

  • Added index.html with Cesium scripts in Flutter assets/.

  • Set WebView to allow JavaScript (javascriptMode: JavascriptMode.unrestricted).

  • Confirmed that window.CESIUM_ION_TOKEN is correctly set.

  • Works fine on desktop browsers but not inside Flutter WebView (Android).

Has anyone faced this issue or found a workaround to make CesiumJS load inside a Flutter WebView?
Any help or example setup would be greatly appreciated!

Thanks in advance :folded_hands:

Hi @meteka,

Thanks for your post and welcome to the Cesium community.

We have a previous discussion thread about steps to get Cesium working on Flutter with WebView Using Cesium on Flutter - #2 by Matt_Amato

This may be enough to answer your initial questions and get you started, but if you have more questions please feel free to follow up and we would be happy to try to help.

Note, another thread asking for developer feedback on using WebView with Cesium was also just opened on the forums, but with no follow up discussion yet. Best framework for a performant CesiumJS mobile app?

Best,
Luke