3D Model Viewer for Flutter

Project license Pub package Dartdoc reference Travis CI build status

This is a Flutter widget for rendering interactive 3D models in the glTF and GLB formats.

Prerequisites

Installation

dependencies:
  model_viewer: ^0.3.0

Examples

Importing the library

import 'package:model_viewer/model_viewer.dart';

Creating a ModelViewer widget

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("Model Viewer")),
        body: ModelViewer(
          src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb',
          alt: "A 3D model of an astronaut",
          ar: true,
          autoRotate: true,
          cameraControls: true,
        ),
      ),
    );
  }
}

Screenshot

Screenshot of astronaut model

Libraries

model_viewer
Flutter widget for rendering interactive 3D models. [...]