update example & version info
This commit is contained in:
parent
7fa3fa56d6
commit
90dab5cd65
4 changed files with 30 additions and 11 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
## [0.0.1] - TODO: Add release date.
|
## [0.1.0] - 02/22/2020
|
||||||
|
|
||||||
* TODO: Describe initial release.
|
* Add sensor control.
|
||||||
|
* Add onViewChanged event.
|
||||||
|
|
||||||
|
## [0.0.2] - 02/22/2020
|
||||||
|
|
||||||
|
* Initial release.
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Add panorama as a dependency in your pubspec.yaml file.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
panorama: ^0.0.2
|
panorama: ^0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Import and add the Panorama widget to your project.
|
Import and add the Panorama widget to your project.
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ class MyHomePage extends StatefulWidget {
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _MyHomePageState extends State<MyHomePage> {
|
||||||
File _imageFile;
|
File _imageFile;
|
||||||
|
double _lon = 0;
|
||||||
|
double _lat = 0;
|
||||||
|
double _tilt = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -34,11 +37,22 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(widget.title),
|
title: Text(widget.title),
|
||||||
),
|
),
|
||||||
body: Panorama(
|
body: Stack(
|
||||||
animSpeed: 0,
|
children: [
|
||||||
interactive: false,
|
Panorama(
|
||||||
sensorControl: SensorControl.Orientation,
|
animSpeed: 1.0,
|
||||||
child: _imageFile != null ? Image.file(_imageFile) : Image.asset('assets/panorama.jpg'),
|
sensorControl: SensorControl.Orientation,
|
||||||
|
onViewChanged: (longitude, latitude, tilt) {
|
||||||
|
setState(() {
|
||||||
|
_lon = longitude;
|
||||||
|
_lat = latitude;
|
||||||
|
_tilt = tilt;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: _imageFile != null ? Image.file(_imageFile) : Image.asset('assets/panorama.jpg'),
|
||||||
|
),
|
||||||
|
Text('${_lon.toStringAsFixed(3)}, ${_lat.toStringAsFixed(3)}, ${_tilt.toStringAsFixed(3)}'),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
mini: true,
|
mini: true,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: panorama
|
name: panorama
|
||||||
description: Panorama -- A 360-degree panorama viewer.
|
description: Panorama -- A 360-degree panorama viewer.
|
||||||
version: 0.0.2
|
version: 0.1.0
|
||||||
homepage: https://github.com/zesage/panorama
|
homepage: https://github.com/zesage/panorama
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -9,8 +9,8 @@ environment:
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_cube: ^0.0.3
|
flutter_cube: ^0.0.6
|
||||||
motion_sensors: ^0.0.1
|
motion_sensors: ^0.0.4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue