From f0754548a9b25a8be89d6e33c49d0f1823fce08e Mon Sep 17 00:00:00 2001 From: Mark Hu Date: Sat, 13 Mar 2021 12:05:12 +0800 Subject: [PATCH] migrate to null safety --- CHANGELOG.md | 4 ++ README.md | 2 +- example/lib/main.dart | 30 ++++++----- example/pubspec.lock | 120 +++++++++++++++++++++--------------------- example/pubspec.yaml | 8 +-- lib/panorama.dart | 120 +++++++++++++++++++++--------------------- pubspec.lock | 101 ++++++++++++----------------------- pubspec.yaml | 8 +-- 8 files changed, 185 insertions(+), 208 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 310cdf7..6e08471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.4.0] - 03/13/2021 + +* migrate to null safety + ## [0.3.2] - 01/09/2021 * Fixed some bugs diff --git a/README.md b/README.md index 3f4999b..4d2b768 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Add panorama as a dependency in your pubspec.yaml file. ```yaml dependencies: - panorama: ^0.3.2 + panorama: ^0.4.0 ``` Import and add the Panorama widget to your project. diff --git a/example/lib/main.dart b/example/lib/main.dart index 55a99c7..3958947 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,3 +1,4 @@ +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:panorama/panorama.dart'; import 'package:image_picker/image_picker.dart'; @@ -16,9 +17,9 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); + MyHomePage({Key? key, this.title}) : super(key: key); - final String title; + final String? title; @override _MyHomePageState createState() => _MyHomePageState(); @@ -34,6 +35,7 @@ class _MyHomePageState extends State { Image.asset('assets/panorama2.webp'), Image.asset('assets/panorama_cropped.webp'), ]; + ImagePicker picker = ImagePicker(); void onViewChanged(longitude, latitude, tilt) { setState(() { @@ -43,13 +45,16 @@ class _MyHomePageState extends State { }); } - Widget hotspotButton({String text, IconData icon, VoidCallback onPressed}) { + Widget hotspotButton({String? text, IconData? icon, VoidCallback? onPressed}) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - FlatButton( - shape: CircleBorder(), - color: Colors.black38, + TextButton( + style: ButtonStyle( + shape: MaterialStateProperty.all(CircleBorder()), + backgroundColor: MaterialStateProperty.all(Colors.black38), + foregroundColor: MaterialStateProperty.all(Colors.white), + ), child: Icon(icon), onPressed: onPressed, ), @@ -142,7 +147,7 @@ class _MyHomePageState extends State { } return Scaffold( appBar: AppBar( - title: Text(widget.title), + title: Text(widget.title!), ), body: Stack( children: [ @@ -152,12 +157,13 @@ class _MyHomePageState extends State { ), floatingActionButton: FloatingActionButton( mini: true, - onPressed: () { - ImagePicker.pickImage(source: ImageSource.gallery).then((value) { - setState(() { - panoImages.add(Image.file(value)); + onPressed: () async { + final pickedFile = await picker.getImage(source: ImageSource.gallery); + setState(() { + if (pickedFile != null) { + panoImages.add(Image.file(File(pickedFile.path))); _panoId = panoImages.length - 1; - }); + } }); }, child: Icon(Icons.panorama), diff --git a/example/pubspec.lock b/example/pubspec.lock index 3531fc1..8900253 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,62 +1,55 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" - collection: + version: "1.2.0" + clock: dependency: transitive description: - name: collection + name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" - convert: + version: "1.1.0" + collection: dependency: transitive description: - name: convert + name: collection url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" - crypto: + version: "1.15.0" + fake_async: dependency: transitive description: - name: crypto + name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -68,82 +61,96 @@ packages: name: flutter_cube url: "https://pub.dartlang.org" source: hosted - version: "0.0.3" + version: "0.1.1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" + version: "2.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - image: + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.0" + http_parser: dependency: transitive description: - name: image + name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "4.0.0" image_picker: dependency: "direct main" description: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.6.3+4" + version: "0.7.2+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.6" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.3.0" motion_sensors: dependency: transitive description: name: motion_sensors url: "https://pub.dartlang.org" source: hosted - version: "0.0.1" + version: "0.1.0" panorama: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.0.2" + version: "0.4.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - petitparser: + version: "1.8.0" + pedantic: dependency: transitive description: - name: petitparser + name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" - quiver: + version: "1.11.0" + plugin_platform_interface: dependency: transitive description: - name: quiver + name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -155,63 +162,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "3.5.0" + version: "2.1.0" sdks: - dart: ">=2.4.0 <3.0.0" - flutter: ">=1.12.13 <2.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=1.20.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9bbbe2a..038725f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,14 +3,14 @@ description: A new Flutter project. version: 1.0.0+1 environment: - sdk: ">=2.1.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: sdk: flutter panorama: path: ../ - image_picker: ^0.6.3+4 + image_picker: ^0.7.2+1 dev_dependencies: flutter_test: @@ -20,4 +20,6 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets/ \ No newline at end of file + - assets/ + +publish_to: none diff --git a/lib/panorama.dart b/lib/panorama.dart index e905368..2c22517 100644 --- a/lib/panorama.dart +++ b/lib/panorama.dart @@ -20,7 +20,7 @@ enum SensorControl { class Panorama extends StatefulWidget { Panorama({ - Key key, + Key? key, this.latitude = 0, this.longitude = 0, this.zoom = 1.0, @@ -107,70 +107,70 @@ class Panorama extends StatefulWidget { final double croppedFullHeight; /// This event will be called when the view direction has changed, it contains latitude and longitude about the current view. - final Function(double longitude, double latitude, double tilt) onViewChanged; + final Function(double longitude, double latitude, double tilt)? onViewChanged; /// This event will be called when the user has tapped, it contains latitude and longitude about where the user tapped. - final Function(double longitude, double latitude, double tilt) onTap; + final Function(double longitude, double latitude, double tilt)? onTap; /// This event will be called when the user has started a long press, it contains latitude and longitude about where the user pressed. - final Function(double longitude, double latitude, double tilt) onLongPressStart; + final Function(double longitude, double latitude, double tilt)? onLongPressStart; /// This event will be called when the user has drag-moved after a long press, it contains latitude and longitude about where the user pressed. - final Function(double longitude, double latitude, double tilt) onLongPressMoveUpdate; + final Function(double longitude, double latitude, double tilt)? onLongPressMoveUpdate; /// This event will be called when the user has stopped a long presses, it contains latitude and longitude about where the user pressed. - final Function(double longitude, double latitude, double tilt) onLongPressEnd; + final Function(double longitude, double latitude, double tilt)? onLongPressEnd; /// Specify an Image(equirectangular image) widget to the panorama. - final Image child; + final Image? child; /// Place widgets in the panorama. - final List hotspots; + final List? hotspots; @override _PanoramaState createState() => _PanoramaState(); } class _PanoramaState extends State with SingleTickerProviderStateMixin { - Scene scene; - Object surface; - double latitude; - double longitude; + Scene? scene; + Object? surface; + late double latitude; + late double longitude; double latitudeDelta = 0; double longitudeDelta = 0; double zoomDelta = 0; - Offset _lastFocalPoint; - double _lastZoom; + late Offset _lastFocalPoint; + double? _lastZoom; double _radius = 500; double _dampingFactor = 0.05; double _animateDirection = 1.0; - AnimationController _controller; + late AnimationController _controller; double screenOrientation = 0.0; Vector3 orientation = Vector3(0, radians(90), 0); - StreamSubscription _orientationSubscription; - StreamSubscription _screenOrientSubscription; - StreamController _streamController; - Stream _stream; - ImageStream _imageStream; + StreamSubscription? _orientationSubscription; + StreamSubscription? _screenOrientSubscription; + late StreamController _streamController; + Stream? _stream; + ImageStream? _imageStream; void _handleTapUp(TapUpDetails details) { final Vector3 o = positionToLatLon(details.localPosition.dx, details.localPosition.dy); - widget.onTap(degrees(o.x), degrees(-o.y), degrees(o.z)); + widget.onTap!(degrees(o.x), degrees(-o.y), degrees(o.z)); } void _handleLongPressStart(LongPressStartDetails details) { final Vector3 o = positionToLatLon(details.localPosition.dx, details.localPosition.dy); - widget.onLongPressStart(degrees(o.x), degrees(-o.y), degrees(o.z)); + widget.onLongPressStart!(degrees(o.x), degrees(-o.y), degrees(o.z)); } void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details) { final Vector3 o = positionToLatLon(details.localPosition.dx, details.localPosition.dy); - widget.onLongPressMoveUpdate(degrees(o.x), degrees(-o.y), degrees(o.z)); + widget.onLongPressMoveUpdate!(degrees(o.x), degrees(-o.y), degrees(o.z)); } void _handleLongPressEnd(LongPressEndDetails details) { final Vector3 o = positionToLatLon(details.localPosition.dx, details.localPosition.dy); - widget.onLongPressEnd(degrees(o.x), degrees(-o.y), degrees(o.z)); + widget.onLongPressEnd!(degrees(o.x), degrees(-o.y), degrees(o.z)); } void _handleScaleStart(ScaleStartDetails details) { @@ -181,12 +181,12 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin void _handleScaleUpdate(ScaleUpdateDetails details) { final offset = details.localFocalPoint - _lastFocalPoint; _lastFocalPoint = details.localFocalPoint; - latitudeDelta += widget.sensitivity * 0.5 * math.pi * offset.dy / scene.camera.viewportHeight; - longitudeDelta -= widget.sensitivity * _animateDirection * 0.5 * math.pi * offset.dx / scene.camera.viewportHeight; + latitudeDelta += widget.sensitivity * 0.5 * math.pi * offset.dy / scene!.camera.viewportHeight; + longitudeDelta -= widget.sensitivity * _animateDirection * 0.5 * math.pi * offset.dx / scene!.camera.viewportHeight; if (_lastZoom == null) { - _lastZoom = scene.camera.zoom; + _lastZoom = scene!.camera.zoom; } - zoomDelta += _lastZoom * details.scale - (scene.camera.zoom + zoomDelta); + zoomDelta += _lastZoom! * details.scale - (scene!.camera.zoom + zoomDelta); if (widget.sensorControl == SensorControl.None && !_controller.isAnimating) { _controller.reset(); if (widget.animSpeed != 0) { @@ -207,9 +207,9 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin longitude += _animateDirection * longitudeDelta * _dampingFactor * widget.sensitivity; longitudeDelta *= 1 - _dampingFactor * widget.sensitivity; // animate zomming - final double zoom = scene.camera.zoom + zoomDelta * _dampingFactor; + final double zoom = scene!.camera.zoom + zoomDelta * _dampingFactor; zoomDelta *= 1 - _dampingFactor; - scene.camera.zoom = zoom.clamp(widget.minZoom, widget.maxZoom); + scene!.camera.zoom = zoom.clamp(widget.minZoom, widget.maxZoom); // stop animation if not needed if (latitudeDelta.abs() < 0.001 && longitudeDelta.abs() < 0.001 && zoomDelta.abs() < 0.001) { if (widget.animSpeed == 0 && _controller.isAnimating) _controller.stop(); @@ -258,9 +258,9 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin o = quaternionToOrientation(q * Quaternion.axisAngle(Vector3(0, 1, 0), math.pi * 0.5)); widget.onViewChanged?.call(degrees(o.x), degrees(-o.y), degrees(o.z)); - q.rotate(scene.camera.target..setFrom(Vector3(0, 0, -_radius))); - q.rotate(scene.camera.up..setFrom(Vector3(0, 1, 0))); - scene.update(); + q.rotate(scene!.camera.target..setFrom(Vector3(0, 0, -_radius))); + q.rotate(scene!.camera.up..setFrom(Vector3(0, 1, 0))); + scene!.update(); } void _updateSensorControl() { @@ -286,24 +286,24 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin _screenOrientSubscription?.cancel(); if (widget.sensorControl != SensorControl.None) { _screenOrientSubscription = motionSensors.screenOrientation.listen((ScreenOrientationEvent event) { - screenOrientation = radians(event.angle); + screenOrientation = radians(event.angle!); }); } } void _updateTexture(ImageInfo imageInfo, bool synchronousCall) { - surface?.mesh?.texture = imageInfo.image; - surface?.mesh?.textureRect = Rect.fromLTWH(0, 0, imageInfo.image.width.toDouble(), imageInfo.image.height.toDouble()); - scene.texture = imageInfo.image; - scene.update(); + surface?.mesh.texture = imageInfo.image; + surface?.mesh.textureRect = Rect.fromLTWH(0, 0, imageInfo.image.width.toDouble(), imageInfo.image.height.toDouble()); + scene!.texture = imageInfo.image; + scene!.update(); } - void _loadTexture(ImageProvider provider) { + void _loadTexture(ImageProvider? provider) { if (provider == null) return; _imageStream?.removeListener(ImageStreamListener(_updateTexture)); _imageStream = provider.resolve(ImageConfiguration()); ImageStreamListener listener = ImageStreamListener(_updateTexture); - _imageStream.addListener(listener); + _imageStream!.addListener(listener); } void _onSceneCreated(Scene scene) { @@ -316,9 +316,9 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin if (widget.child != null) { final Mesh mesh = generateSphereMesh(radius: _radius, latSegments: widget.latSegments, lonSegments: widget.lonSegments, croppedArea: widget.croppedArea, croppedFullWidth: widget.croppedFullWidth, croppedFullHeight: widget.croppedFullHeight); surface = Object(name: 'surface', mesh: mesh, backfaceCulling: false); - _loadTexture(widget.child.image); - scene.world.add(surface); - WidgetsBinding.instance.addPostFrameCallback((_) => _updateView()); + _loadTexture(widget.child!.image); + scene.world.add(surface!); + WidgetsBinding.instance!.addPostFrameCallback((_) => _updateView()); } } @@ -328,9 +328,9 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin Vector3 positionToLatLon(double x, double y) { // transform viewport coordinate to NDC, values between -1 and 1 - final Vector4 v = Vector4(2.0 * x / scene.camera.viewportWidth - 1.0, 1.0 - 2.0 * y / scene.camera.viewportHeight, 1.0, 1.0); + final Vector4 v = Vector4(2.0 * x / scene!.camera.viewportWidth - 1.0, 1.0 - 2.0 * y / scene!.camera.viewportHeight, 1.0, 1.0); // create projection matrix - final Matrix4 m = scene.camera.projectionMatrix * scene.camera.lookAtMatrix; + final Matrix4 m = scene!.camera.projectionMatrix * scene!.camera.lookAtMatrix; // apply inversed projection matrix m.invert(); v.applyMatrix4(m); @@ -344,24 +344,24 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin Vector3 positionFromLatLon(double lat, double lon) { // create projection matrix - final Matrix4 m = scene.camera.projectionMatrix * scene.camera.lookAtMatrix * matrixFromLatLon(lat, lon); + final Matrix4 m = scene!.camera.projectionMatrix * scene!.camera.lookAtMatrix * matrixFromLatLon(lat, lon); // apply projection atrix final Vector4 v = Vector4(0.0, 0.0, -_radius, 1.0)..applyMatrix4(m); // apply perspective division and transform NDC to the viewport coordinate return Vector3( - (1.0 + v.x / v.w) * scene.camera.viewportWidth / 2, - (1.0 - v.y / v.w) * scene.camera.viewportHeight / 2, + (1.0 + v.x / v.w) * scene!.camera.viewportWidth / 2, + (1.0 - v.y / v.w) * scene!.camera.viewportHeight / 2, v.z, ); } - Widget buildHotspotWidgets(List hotspots) { - final List widgets = List(); + Widget buildHotspotWidgets(List? hotspots) { + final List widgets = []; if (hotspots != null && scene != null) { for (Hotspot hotspot in hotspots) { final Vector3 pos = positionFromLatLon(hotspot.latitude, hotspot.longitude); final Offset orgin = Offset(hotspot.width * hotspot.orgin.dx, hotspot.height * hotspot.orgin.dy); - final Matrix4 transform = scene.camera.lookAtMatrix * matrixFromLatLon(hotspot.latitude, hotspot.longitude); + final Matrix4 transform = scene!.camera.lookAtMatrix * matrixFromLatLon(hotspot.latitude, hotspot.longitude); final Widget child = Positioned( left: pos.x - orgin.dx, top: pos.y - orgin.dy, @@ -411,7 +411,7 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin super.didUpdateWidget(oldWidget); if (surface == null) return; if (widget.latSegments != oldWidget.latSegments || widget.lonSegments != oldWidget.lonSegments || widget.croppedArea != oldWidget.croppedArea || widget.croppedFullWidth != oldWidget.croppedFullWidth || widget.croppedFullHeight != oldWidget.croppedFullHeight) { - surface.mesh = generateSphereMesh(radius: _radius, latSegments: widget.latSegments, lonSegments: widget.lonSegments, croppedArea: widget.croppedArea, croppedFullWidth: widget.croppedFullWidth, croppedFullHeight: widget.croppedFullHeight); + surface!.mesh = generateSphereMesh(radius: _radius, latSegments: widget.latSegments, lonSegments: widget.lonSegments, croppedArea: widget.croppedArea, croppedFullWidth: widget.croppedFullWidth, croppedFullHeight: widget.croppedFullHeight); } if (widget.child?.image != oldWidget.child?.image) { _loadTexture(widget.child?.image); @@ -452,8 +452,8 @@ class _PanoramaState extends State with SingleTickerProviderStateMixin class Hotspot { Hotspot({ this.name, - this.latitude, - this.longitude, + this.latitude = 0.0, + this.longitude = 0.0, this.orgin = const Offset(0.5, 0.5), this.width = 32.0, this.height = 32.0, @@ -461,7 +461,7 @@ class Hotspot { }); /// The name of this hotspot. - String name; + String? name; /// The initial latitude, in degrees, between -90 and 90. final double latitude; @@ -478,14 +478,14 @@ class Hotspot { // The height of widget. Default is 32.0 double height; - Widget widget; + Widget? widget; } -Mesh generateSphereMesh({num radius = 1.0, int latSegments = 16, int lonSegments = 16, ui.Image texture, Rect croppedArea = const Rect.fromLTWH(0.0, 0.0, 1.0, 1.0), double croppedFullWidth = 1.0, double croppedFullHeight = 1.0}) { +Mesh generateSphereMesh({num radius = 1.0, int latSegments = 16, int lonSegments = 16, ui.Image? texture, Rect croppedArea = const Rect.fromLTWH(0.0, 0.0, 1.0, 1.0), double croppedFullWidth = 1.0, double croppedFullHeight = 1.0}) { int count = (latSegments + 1) * (lonSegments + 1); - List vertices = List(count); - List texcoords = List(count); - List indices = List(latSegments * lonSegments * 2); + List vertices = List.filled(count, Vector3.zero()); + List texcoords = List.filled(count, Offset.zero); + List indices = List.filled(latSegments * lonSegments * 2, Polygon(0, 0, 0)); int i = 0; for (int y = 0; y <= latSegments; ++y) { diff --git a/pubspec.lock b/pubspec.lock index c09a35e..ae41e5e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,62 +1,55 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" - collection: + version: "1.2.0" + clock: dependency: transitive description: - name: collection + name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" - convert: + version: "1.1.0" + collection: dependency: transitive description: - name: convert + name: collection url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" - crypto: + version: "1.15.0" + fake_async: dependency: transitive description: - name: crypto + name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -68,61 +61,40 @@ packages: name: flutter_cube url: "https://pub.dartlang.org" source: hosted - version: "0.0.3" + version: "0.1.1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.6" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.3.0" motion_sensors: dependency: "direct main" description: name: motion_sensors url: "https://pub.dartlang.org" source: hosted - version: "0.0.1" + version: "0.1.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -134,63 +106,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "3.5.0" + version: "2.1.0" sdks: - dart: ">=2.4.0 <3.0.0" + dart: ">=2.12.0 <3.0.0" flutter: ">=1.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index b2ed630..0b1c36b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,16 +1,16 @@ name: panorama description: Panorama -- A 360-degree panorama viewer. -version: 0.3.2 +version: 0.4.0 homepage: https://github.com/zesage/panorama environment: - sdk: ">=2.1.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: sdk: flutter - flutter_cube: ^0.0.6 - motion_sensors: ^0.0.5 + flutter_cube: ^0.1.1 + motion_sensors: ^0.1.0 dev_dependencies: flutter_test: