aura_sphere_360 2.0.1
aura_sphere_360: ^2.0.1 copied to clipboard
Immersive 360° panorama and video viewer for Flutter. Display spherical images and videos with touch controls, sensor controls, and smooth 30 FPS playback. Perfect for VR experiences and 360° media.
// ignore_for_file: avoid_print
import 'package:example/screens/example_screen_5.dart';
import 'package:example/screens/example_screen_video.dart';
import 'package:example/screens/example_screen_file_picker.dart';
import 'package:example/screens/example_screen_webrtc.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',
),
),
);
},
),
const Divider(),
ListTile(
title: const Text('Example 6 - Video Panorama (NEW)'),
subtitle: const Text('360° video playback'),
leading: const Icon(Icons.video_library, color: Colors.blue),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ExampleScreenVideo(
title: 'Video Panorama',
),
),
);
},
),
ListTile(
title: const Text('Example 7 - File Picker Test (NEW)'),
subtitle: const Text('Test with your own videos/images'),
leading: const Icon(Icons.folder_open, color: Colors.green),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ExampleScreenFilePicker(
title: 'File Picker Test',
),
),
);
},
),
ListTile(
title: const Text('Example 8 - WebRTC Live Streaming (NEW)'),
subtitle: const Text('Live 360° video via WebRTC'),
leading: const Icon(Icons.live_tv, color: Colors.orange),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ExampleScreenWebRTC(
title: 'WebRTC Live Streaming',
),
),
);
},
),
],
),
);
}
}