spline_viewer 0.0.1 copy "spline_viewer: ^0.0.1" to clipboard
spline_viewer: ^0.0.1 copied to clipboard

A tool to integrate Spline Views

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:spline_viewer/loading_spinner_enum.dart';
import 'package:spline_viewer/spline_viewer.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  static const moduleUrl ="https://unpkg.com/@splinetool/viewer@1.10.26/build/spline-viewer.js";
  static const splineViewerUrl ="https://prod.spline.design/Fli0STTt4mhvEGcq/scene.splinecode";
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      title: 'Spline Example Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home:
      Scaffold(
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            SizedBox(
              height: MediaQuery.of(context).size.height /4,
              width:MediaQuery.of(context).size.width *1.1,
              child: const SplineViewer(
                moduleUrl: moduleUrl,
                splineViewerUrl: splineViewerUrl,
                cameraHint: true,
                loadingAnimType:
                LoadingSpinner.bigLight,
                altText: "Explanation of your Spline Animation",
                styleCss: "width: 100%; height: 100%;",
              ),
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
140
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

A tool to integrate Spline Views

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, webview_flutter_plus

More

Packages that depend on spline_viewer