A 360-degree panorama viewer. Supported platforms: Android, iOS, Tablet, Web Support(Mobile/Desktop).
This package is an updated porting of the plugin https://github.com/dariocavada/panorama_viewer
Add panorama as a dependency in your pubspec.yaml file.
dependencies:
panorama_viewer_plus: ^0.1.0
Import and add the Panorama Viewer widget to your project.
import 'package:panorama_viewer_plus/panorama_viewer_plus.dart';
... ...
@override
Widget build(BuildContext context) {
var deviceSize = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(title: const Text("Custom Panorama Viewer")),
body: Center(
child: CustomPanoramaViewer(
imagePath: 'https://raw.githubusercontent.com/ShreyaAmbaliya/panorama_viewer_plus/main/example/assets/test.jpg',
width: deviceSize.width,
height: 220,
),
),
);
}
import 'package:panorama_viewer_plus/panorama_viewer_plus.dart';
... ...
@override
Widget build(BuildContext context) {
var deviceSize = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(title: const Text("Custom Panorama Viewer")),
body: Center(
child: CustomPanoramaViewer(
imagePath:'assets/test.jpg',
isAssetImage:true,
width: deviceSize.width,
height: 220,
),
),
);
}
Star project on github.com.
Like on pub.dev.