src property

String src
final

The URL or path to the 3D model. This parameter is required. Only glTF/GLB models are supported.

The parameter value must conform to the following:

  • http:// and https:// for HTTP(S) URLs (for example, https://modelviewer.dev/shared-assets/models/Astronaut.glb)

  • file:// for local files (NOT AVAILABLE in Web)

  • a relative pathname for Flutter app assets (for example, assets/MyModel.glb)

<model-viewer> official document: https://modelviewer.dev/docs/#entrydocs-loading-attributes-src

Implementation

final String src;