panorama_viewer 2.0.0 copy "panorama_viewer: ^2.0.0" to clipboard
panorama_viewer: ^2.0.0 copied to clipboard

Panorama Viewer - A 360-degree panorama viewer.

example/lib/main.dart

// ignore_for_file: avoid_print

import 'package:example/screens/example_screen_5.dart';
import 'package:flutter/material.dart';

import 'screens/example_screen_1.dart';
import 'screens/example_screen_2.dart';
import 'screens/example_screen_3.dart';
import 'screens/example_screen_4.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Panorama',
      theme: ThemeData.dark(),
      home: const MainScreen(),
    );
  }
}

class MainScreen extends StatelessWidget {
  const MainScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter Panorama Viewer'),
      ),
      body: ListView(
        children: [
          ListTile(
            title: const Text('Example 1 - minimum code'),
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => const ExampleScreen1(
                    title: 'Minimum code',
                  ),
                ),
              );
            },
          ),
          ListTile(
            title: const Text('Example 2 - transparent appbar'),
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => const ExampleScreen2(
                    title: 'Transparent appbar',
                  ),
                ),
              );
            },
          ),
          ListTile(
            title: const Text('Example 3 - with hotspots and callbacks'),
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => const ExampleScreen3(
                    title: 'Hotspots and callbacks',
                  ),
                ),
              );
            },
          ),
          ListTile(
            title: const Text('Example 4 - Zoom and position with buttons'),
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => const ExampleScreen4(
                    title: 'Zoom and position with buttons',
                  ),
                ),
              );
            },
          ),
          ListTile(
            title: const Text('Example 5 - 2 panoramas side by side'),
            onTap: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => const ExampleScreen5(
                    title: '2 panoramas side by side',
                  ),
                ),
              );
            },
          ),
        ],
      ),
    );
  }
}
21
likes
140
points
1.29k
downloads

Publisher

verified publisherdariocavada.com

Weekly Downloads

Panorama Viewer - A 360-degree panorama viewer.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

dchs_motion_sensors, flutter, flutter_cube

More

Packages that depend on panorama_viewer