model_viewer 0.8.1 icon indicating copy to clipboard operation
model_viewer: ^0.8.1 copied to clipboard

PlatformAndroid

A Flutter widget for rendering interactive 3D models in the glTF and GLB formats.

example/lib/main.dart

/* This is free and unencumbered software released into the public domain. */

import 'package:flutter/material.dart';
import 'package:model_viewer/model_viewer.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("Model Viewer")),
        body: ModelViewer(
          backgroundColor: Color.fromARGB(0xFF, 0xEE, 0xEE, 0xEE),
          //src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb',
          src: 'etc/assets/Astronaut.glb', // a bundled asset file
          alt: "A 3D model of an astronaut",
          ar: true,
          autoRotate: true,
          cameraControls: true,
        ),
      ),
    );
  }
}
115
likes
100
pub points
87%
popularity

Publisher

verified publisher iconar.to

A Flutter widget for rendering interactive 3D models in the glTF and GLB formats.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.Unlicense (UNLICENSE)

Dependencies

dogma, flutter, flutter_android, webview_flutter

More

Packages that depend on model_viewer