panorama_viewer_plus 0.1.2
panorama_viewer_plus: ^0.1.2 copied to clipboard
Panorama Viewer Plus - A 360-degree panorama viewer. Supports: Android, iOS, Tablet, Web Support(Mobile/Desktop).
import 'package:flutter/material.dart';
import 'package:panorama_viewer_plus/panorama_viewer_plus.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Custom Panorama Widget',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
var deviceSize = MediaQuery.of(context).size;
return Scaffold(
body: Center(
child: CustomPanoramaViewer(
imagePath: 'https://raw.githubusercontent.com/ShreyaAmbaliya/panorama_viewer_plus/main/example/assets/test.jpg',
width: deviceSize.width,
height: deviceSize.height,
),
),
);
}
}