flutter_cube 0.1.1 copy "flutter_cube: ^0.1.1" to clipboard
flutter_cube: ^0.1.1 copied to clipboard

A Flutter 3D widget that renders Wavefront's object files.

Flutter Cube #

pub package

A Flutter 3D widget that renders Wavefront's object files.

Getting Started #

Add flutter_cube as a dependency in your pubspec.yaml file.

dependencies:
  flutter_cube: ^0.1.1

Add Wavefront's object files to assets.

flutter:
  assets:
    - assets/cube/cube.obj
    - assets/cube/cube.mtl
    - assets/cube/flutter.png

Import and add the Cube widget to your project.

import 'package:flutter_cube/flutter_cube.dart';
... ...
  
@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Cube(
          onSceneCreated: (Scene scene) {
            scene.world.add(Object(fileName: 'assets/cube/cube.obj'));
          },
        ),
      ),
    );
  }

Screenshot #

screenshot screenshot screenshot

312
likes
120
points
6.35k
downloads

Publisher

verified publisherfinal.dev

Weekly Downloads

A Flutter 3D widget that renders Wavefront's object files.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, path, vector_math

More

Packages that depend on flutter_cube