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
|
||||
dependencies:
|
||||
panorama: ^0.0.2
|
||||
panorama: ^0.1.0
|
||||
```
|
||||
|
||||
Import and add the Panorama widget to your project.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ class MyHomePage extends StatefulWidget {
|
|||
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
File _imageFile;
|
||||
double _lon = 0;
|
||||
double _lat = 0;
|
||||
double _tilt = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -34,11 +37,22 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: Panorama(
|
||||
animSpeed: 0,
|
||||
interactive: false,
|
||||
sensorControl: SensorControl.Orientation,
|
||||
child: _imageFile != null ? Image.file(_imageFile) : Image.asset('assets/panorama.jpg'),
|
||||
body: Stack(
|
||||
children: [
|
||||
Panorama(
|
||||
animSpeed: 1.0,
|
||||
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(
|
||||
mini: true,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: panorama
|
||||
description: Panorama -- A 360-degree panorama viewer.
|
||||
version: 0.0.2
|
||||
version: 0.1.0
|
||||
homepage: https://github.com/zesage/panorama
|
||||
|
||||
environment:
|
||||
|
|
@ -9,8 +9,8 @@ environment:
|
|||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_cube: ^0.0.3
|
||||
motion_sensors: ^0.0.1
|
||||
flutter_cube: ^0.0.6
|
||||
motion_sensors: ^0.0.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
|
|||
Loading…
Reference in a new issue