sceneview_flutter 0.0.1 sceneview_flutter: ^0.0.1 copied to clipboard
A demonstration of how to integrate SceneView in flutter.
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:sceneview_flutter/sceneview_flutter.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
SceneViewController _controller = SceneViewController();
@override
void initState() {
super.initState();
Future.delayed(const Duration(seconds: 1)).then((value) {
if (!mounted) return;
_controller.displayDemo();
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Scene view example app'),
),
body: SceneView(_controller),
),
);
}
}