From 7d695e76c2627b41c55663ad8e88b1ea66d9ae18 Mon Sep 17 00:00:00 2001 From: Roi Peker Date: Sat, 19 Nov 2022 00:57:18 -0300 Subject: [PATCH] fixes for 1.0.5 ## [1.0.5] - adds support for the new PointerPanZoom*Event family on Listenable that overrides the mouse Signal (mouse wheel) on desktop OS. Basically, currently on desktop builds, everytime a mouse wheel event is triggered, a PointerPanZoomEvent is dispatched on the Listenable. Check [MyButton] in [SimpleInteractionsMain] demo, for an example of how to use it. - add Generic Type [T] support to addChild - updated some samples for the API. --- CHANGELOG.md | 10 ++- example/.gitignore | 1 - .../simple_interactions/ui/my_button.dart | 72 +++++++++++++++---- example/lib/demos/svg_icons/test_icons.dart | 3 +- .../lib/demos/svg_icons/test_svg_scene.dart | 25 ++++--- example/pubspec.yaml | 4 +- example/web/index.html | 2 +- lib/src/display/display_object.dart | 3 + lib/src/display/display_object_container.dart | 20 +++--- lib/src/events/mixins.dart | 38 +++++++++- lib/src/events/pointer_data.dart | 25 ++++++- lib/src/input/input_converter.dart | 23 +++++- lib/src/input/pointer_manager.dart | 5 ++ lib/src/widgets/graphx_widget.dart | 3 + pubspec.lock | 47 ++++++------ pubspec.yaml | 8 +-- 16 files changed, 212 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85cfad8..09ccfd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ +## [1.0.5] + +- adds support for the new PointerPanZoom*Event family on Listenable that overrides the mouse Signal (mouse wheel) on desktop OS. + Basically, currently on desktop builds, everytime a mouse wheel event is triggered, a PointerPanZoomEvent is dispatched on the Listenable. + Check [MyButton] in [SimpleInteractionsMain] demo, for an example of how to use it. +- add Generic Type [T] support to addChild +- updated some samples for the API. + ## [1.0.4] -- Updated to run with flutter 3. +- updated to run with flutter 3. ## [1.0.3] diff --git a/example/.gitignore b/example/.gitignore index 3da1b76..e31958f 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -44,7 +44,6 @@ build/ .DS_Store # Web related -lib/generated_plugin_registrant.dart # Symbolication related app.*.symbols diff --git a/example/lib/demos/simple_interactions/ui/my_button.dart b/example/lib/demos/simple_interactions/ui/my_button.dart index 40465bd..60fb93a 100644 --- a/example/lib/demos/simple_interactions/ui/my_button.dart +++ b/example/lib/demos/simple_interactions/ui/my_button.dart @@ -1,3 +1,5 @@ +import 'dart:ui'; + import 'package:flutter/material.dart'; import 'package:graphx/graphx.dart'; @@ -19,6 +21,16 @@ class MyButton extends GSprite { bool _isOn = false; double _fillPercent = 0.0; + // track last value for this particular event on desktop OS. + // `onZoomPan` reports start,update and end... and we only want + // `update` (the one that has scroll data). + double lastZoomPanRatio = 0.0; + + // track last event time for this particular event on desktop OS. + // so we can detect a threshold of X ms between events to cancel + // the "easing". + double lastZoomPanTime = 0.0; + late GText _fillText; MyButton() { @@ -64,6 +76,7 @@ class MyButton extends GSprite { // only on desktop. onMouseScroll.add(_onMouseScroll); + onZoomPan.add(_onZoomPan); } void _initText() { @@ -105,17 +118,54 @@ class MyButton extends GSprite { stage!.onMouseUp.addOnce(_onStageRelease); } - /// Handler for mouse scroll wheel (only desktop). + /// Handler for mouse scroll wheel (only desktop WEB seems to work). void _onMouseScroll(MouseInputData input) { - /// take the direction of the scroll wheel - var scrollDir = input.scrollDelta.y < 0 ? 1 : -1; - _fillPercent += .01 * scrollDir; + /// "Pixel" variation... takes it as a ratio of the button height. + /// considering window scale factor. Some devices could report bug + /// values for scrollDelta (according to device and OS sensibility). + /// Can be scaled by 700% of what is expected (a subtle range between 1-10). + /// Can be easily adjusted with some math, increasing the `dpiFactor`. + var dpiFactor = 1.5; + var ratioY = + (input.scrollDelta.y / h) / (window.devicePixelRatio * dpiFactor); + _fillPercent += ratioY; _fillPercent = _fillPercent.clamp(0.0, 1.0); _updateFill(); + + + /// "Smoother" variation, take the direction (1, -1) of the scroll wheel + // var scrollDir = input.scrollDelta.y < 0 ? 1 : -1; + // _fillPercent += .01 * scrollDir; + // _fillPercent = _fillPercent.clamp(0.0, 1.0); + // _updateFill(); + } + + void _onZoomPan(MouseInputData e) { + var type = e.rawEvent!.zoomPanEventType; + if (type == PointerZoomPanType.update) { + var ratioY = (e.scrollDelta.y / h) / (window.devicePixelRatio * 1.5); + lastZoomPanRatio = ratioY; + lastZoomPanTime = e.time; + _fillPercent += ratioY; + _fillPercent = _fillPercent.clamp(0.0, 1.0); + _updateFill(); + } else if (type == PointerZoomPanType.end) { + var timeDiff = e.time - lastZoomPanTime; + // over 200ms, reject gesture (too slow for a flick) + if (timeDiff > .2) { + return; + } + var tweenRatio = lastZoomPanRatio.twn; + tweenRatio.tween(0.0, duration: 0.5, onUpdate: () { + _fillPercent += tweenRatio.value; + _fillPercent = _fillPercent.clamp(0.0, 1.0); + _updateFill(); + }); + } } /// handler for mouse over. - /// this happens when the mouse enters into the bounding box area + /// this happens when the mouse enters into the bounding box areaes /// of the object that is listening for this signal. /// Means that the pointer started to interact with this object. /// Similar to "onmouseover" in Javascript. @@ -153,13 +203,11 @@ class MyButton extends GSprite { /// update the [icon.data] and icon's color, based on [_isOn] current state. void _updateIcon() { if (_isOn) { - if (_isOn) { - icon.data = Icons.wb_incandescent; - icon.color = Colors.yellow; - } else { - icon.data = Icons.wb_incandescent_outlined; - icon.color = Colors.white; - } + icon.data = Icons.wb_incandescent; + icon.color = Colors.yellow; + } else { + icon.data = Icons.wb_incandescent_outlined; + icon.color = Colors.white; } } diff --git a/example/lib/demos/svg_icons/test_icons.dart b/example/lib/demos/svg_icons/test_icons.dart index 39f2a7d..b4796e1 100644 --- a/example/lib/demos/svg_icons/test_icons.dart +++ b/example/lib/demos/svg_icons/test_icons.dart @@ -7,8 +7,7 @@ class TestIcons extends GSprite { } void _init() { - final iconsContainer = GSprite(); - addChild(iconsContainer); + final iconsContainer = addChild(GSprite()); iconsContainer.x = 100; iconsContainer.y = 100; diff --git a/example/lib/demos/svg_icons/test_svg_scene.dart b/example/lib/demos/svg_icons/test_svg_scene.dart index 098f860..16d2181 100644 --- a/example/lib/demos/svg_icons/test_svg_scene.dart +++ b/example/lib/demos/svg_icons/test_svg_scene.dart @@ -17,10 +17,8 @@ class TestSvgScene extends GSprite { await _loadData(); _drawSun(); - trees = GSprite(); - ground = GSprite(); - addChild(trees); - addChild(ground); + trees = addChild(GSprite()); + ground = addChild(GSprite()); trees.y = stage!.stageHeight - groundHeight; ground.y = stage!.stageHeight - groundHeight; @@ -45,11 +43,10 @@ class TestSvgScene extends GSprite { var currentObjectX = 30.0; for (var i = 0; i < 15; ++i) { final treeId = i.isOdd ? SvgId.tree : SvgId.pine; - var tree = getSvgIcon(treeId); + var tree = trees.addChild(getSvgIcon(treeId)); tree.alignPivot(Alignment.bottomCenter); tree.x = currentObjectX; tree.scale = Math.randomRange(.4, 1.4); - trees.addChild(tree); currentObjectX += Math.randomRange(20, 80); /// let's skew the tree so it seems the wind is moving it. @@ -140,7 +137,6 @@ class TestSvgScene extends GSprite { for (var i = 0; i < 100; ++i) { final leafId = i.isOdd ? SvgId.leaf : SvgId.leaf2; var leaf = getSvgIcon(leafId); - addChild(leaf); var px = Math.randomRange(10, stage!.stageWidth - 10); @@ -176,6 +172,10 @@ class TestSvgScene extends GSprite { skewX: randomSkew, skewY: -randomSkew / 2, onComplete: () { + if(!leaf.inStage){ + leaf.removeFromParent(true); + return; + } if (leaf.y > stage!.stageHeight) { print('Leaf outside of stage, remove and dispose it.'); leaf.removeFromParent(true); @@ -188,10 +188,13 @@ class TestSvgScene extends GSprite { final randomX = Math.randomRange(5, 40) * dir; final randomY = Math.randomRange(5, 30); leaf.tween( - duration: randomDuration * .9, - x: '$randomX', - y: '$randomY', - ease: GEase.linear); + duration: randomDuration * .8, + x: '$randomX', + y: '$randomY', + ease: GEase.easeOut, + /// import to not kill previous tween. + overwrite: 0, + ); } /// utils for parsing SVG. diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 85ddc55..611ac8a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,10 +3,10 @@ description: Graphx rendering prototype examples publish_to: "none" -version: 1.0.4+26 +version: 1.0.4+27 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.18.4 <3.0.0" dependencies: flutter: diff --git a/example/web/index.html b/example/web/index.html index ef1f5da..e53732b 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -40,6 +40,6 @@ }); } - + diff --git a/lib/src/display/display_object.dart b/lib/src/display/display_object.dart index 99449bf..8b57950 100644 --- a/lib/src/display/display_object.dart +++ b/lib/src/display/display_object.dart @@ -131,6 +131,9 @@ abstract class GDisplayObject if (mouseEnabled) { var mouseInput = input.clone(this, object, type); switch (type) { + case MouseInputType.zoomPan: + $onZoomPan?.dispatch(mouseInput); + break; case MouseInputType.wheel: $onMouseWheel?.dispatch(mouseInput); break; diff --git a/lib/src/display/display_object_container.dart b/lib/src/display/display_object_container.dart index 7f60df1..b2751c5 100644 --- a/lib/src/display/display_object_container.dart +++ b/lib/src/display/display_object_container.dart @@ -128,11 +128,11 @@ abstract class GDisplayObjectContainer extends GDisplayObject { return null; } - GDisplayObject addChild(GDisplayObject child) { + T addChild(T child) { return addChildAt(child, children.length); } - GDisplayObject addChildAt(GDisplayObject child, int index) { + T addChildAt(T child, int index) { if (index < 0 || index > children.length) { throw RangeError('Invalid child index'); } @@ -201,16 +201,16 @@ abstract class GDisplayObjectContainer extends GDisplayObject { requiresRedraw(); } - GDisplayObject getChildAt(int index) { + T getChildAt(int index) { final len = children.length; if (index < 0) index = len + index; - if (index >= 0 && index < len) return children[index]; + if (index >= 0 && index < len) return children[index] as T; throw RangeError('Invalid child index'); } - GDisplayObject? getChildByName(String name) { + T? getChildByName(String name) { for (final child in children) { - if (child.name == name) return child; + if (child.name == name) return child as T; } return null; } @@ -245,7 +245,7 @@ abstract class GDisplayObjectContainer extends GDisplayObject { return false; } - GDisplayObject removeChildAt(int index, [bool dispose = false]) { + T removeChildAt(int index, [bool dispose = false]) { if (index >= 0 && index < children.length) { requiresRedraw(); final child = children[index]; @@ -261,15 +261,15 @@ abstract class GDisplayObjectContainer extends GDisplayObject { index = children.indexOf(child); if (index >= 0) children.removeAt(index); if (dispose) child.dispose(); - return child; + return child as T; } throw 'Invalid child index'; } - GDisplayObject? removeChild(GDisplayObject child, [bool dispose = false]) { + T? removeChild(T child, [bool dispose = false]) { if (child.$parent != this) return null; final index = getChildIndex(child); - if (index > -1) return removeChildAt(index, dispose); + if (index > -1) return removeChildAt(index, dispose); throw 'Invalid child index'; } diff --git a/lib/src/events/mixins.dart b/lib/src/events/mixins.dart index 1e686f7..e1d38f5 100644 --- a/lib/src/events/mixins.dart +++ b/lib/src/events/mixins.dart @@ -26,7 +26,8 @@ mixin EventDispatcherMixin implements Listenable { mixin TickerSignalMixin { EventSignal? $onEnterFrame; - EventSignal get onEnterFrame => $onEnterFrame ??= EventSignal(); + EventSignal get onEnterFrame => + $onEnterFrame ??= EventSignal(); void $disposeTickerSignals() { $onEnterFrame?.removeAll(); @@ -36,6 +37,7 @@ mixin TickerSignalMixin { mixin ResizeSignalMixin { Signal? $onResized; + Signal get onResized => $onResized ??= Signal(); void $disposeResizeSignals() { @@ -76,11 +78,13 @@ mixin DisplayListSignalsMixin { mixin RenderSignalMixin { EventSignal? $onPrePaint; EventSignal? $onPostPaint; + // EventSignal $onPaint; EventSignal get onPrePaint => $onPrePaint ??= EventSignal(); - EventSignal get onPostPaint => $onPostPaint ??= EventSignal(); + EventSignal get onPostPaint => + $onPostPaint ??= EventSignal(); // EventSignal get onPaint => $onPaint ??= EventSignal(); @@ -100,6 +104,7 @@ mixin StageMouseSignalsMixin { EventSignal? $onMouseEnter; EventSignal get onMouseLeave => $onMouseLeave ??= EventSignal(); + EventSignal get onMouseEnter => $onMouseEnter ??= EventSignal(); void $disposeStagePointerSignals() { @@ -121,17 +126,32 @@ mixin MouseSignalsMixin { EventSignal? $onMouseOut; EventSignal? $onMouseOver; EventSignal? $onMouseWheel; + EventSignal? $onZoomPan; EventSignal get onMouseClick => $onMouseClick ??= EventSignal(); - EventSignal get onMouseDoubleClick => $onMouseDoubleClick ??= EventSignal(); + + EventSignal get onMouseDoubleClick => + $onMouseDoubleClick ??= EventSignal(); + EventSignal get onRightMouseDown => $onRightMouseDown ??= EventSignal(); + EventSignal get onMouseDown => $onMouseDown ??= EventSignal(); + EventSignal get onMouseUp => $onMouseUp ??= EventSignal(); + EventSignal get onMouseMove => $onMouseMove ??= EventSignal(); + EventSignal get onMouseOver => $onMouseOver ??= EventSignal(); + EventSignal get onMouseOut => $onMouseOut ??= EventSignal(); + EventSignal get onMouseScroll => $onMouseWheel ??= EventSignal(); + // Available since Flutter 3.x I guess? + // Use this event in favor of onMouseScroll on desktop. + // Might change in the future. + EventSignal get onZoomPan => $onZoomPan ??= EventSignal(); + void $disposePointerSignals() { $onRightMouseDown?.removeAll(); $onRightMouseDown = null; @@ -151,6 +171,8 @@ mixin MouseSignalsMixin { $onMouseOut = null; $onMouseWheel?.removeAll(); $onMouseWheel = null; + $onZoomPan?.removeAll(); + $onZoomPan = null; } } @@ -161,14 +183,22 @@ mixin PointerSignalsMixin { EventSignal? $onHover; EventSignal? $onOut; EventSignal? $onScroll; + EventSignal? $onZoomPan; EventSignal get onClick => $onClick ??= EventSignal(); + EventSignal get onDown => $onDown ??= EventSignal(); + EventSignal get onUp => $onUp ??= EventSignal(); + EventSignal get onHover => $onHover ??= EventSignal(); + EventSignal get onOut => $onOut ??= EventSignal(); + EventSignal get onScroll => $onScroll ??= EventSignal(); + EventSignal get onZoomPan => $onZoomPan ??= EventSignal(); + void $disposePointerSignals() { $onClick?.removeAll(); $onClick = null; @@ -182,5 +212,7 @@ mixin PointerSignalsMixin { $onOut = null; $onScroll?.removeAll(); $onScroll = null; + $onZoomPan?.removeAll(); + $onZoomPan = null; } } diff --git a/lib/src/events/pointer_data.dart b/lib/src/events/pointer_data.dart index 2a8465c..41a6f3d 100644 --- a/lib/src/events/pointer_data.dart +++ b/lib/src/events/pointer_data.dart @@ -3,6 +3,7 @@ import '../../graphx.dart'; /// over, out are mouse enum PointerEventType { + zoomPan, scroll, cancel, move, @@ -13,6 +14,9 @@ enum PointerEventType { hover, } +enum PointerZoomPanType { + start, update, end, none +} class PointerEventData { final double stageX; final double stageY; @@ -26,8 +30,6 @@ class PointerEventData { double get localY => localPosition.y; -// double localX, localY; - /// 300 milliseconds for double click static int doubleClickTime = 300; @@ -42,10 +44,26 @@ class PointerEventData { Offset? get scrollDelta { if (rawEvent is PointerScrollEvent) { return (rawEvent as PointerScrollEvent).scrollDelta; + } else if (rawEvent is PointerPanZoomUpdateEvent) { + // TODO: temporal workaround for mouse wheel compatibility. + // will be removed in next version and change "onScroll" for "onSignal" + // to keep Flutter's compatibility. + return (rawEvent as PointerPanZoomUpdateEvent).localPanDelta; } return null; } + PointerZoomPanType get zoomPanEventType { + if(rawEvent is PointerPanZoomStartEvent){ + return PointerZoomPanType.start; + } else if(rawEvent is PointerPanZoomUpdateEvent){ + return PointerZoomPanType.update; + } else if(rawEvent is PointerPanZoomEndEvent){ + return PointerZoomPanType.end; + } + return PointerZoomPanType.none; + } + GPoint get windowPosition => GPoint.fromNative(rawEvent.original!.position); GPoint get stagePosition => GPoint.fromNative(rawEvent.localPosition); @@ -96,6 +114,7 @@ enum MouseInputType { click, still, wheel, + zoomPan, /// check button directly with: isPrimaryDown, isSecondaryDown... // rightDown, @@ -206,6 +225,8 @@ class MouseInputData { return MouseInputType.exit; } else if (nativeType == PointerEventType.scroll) { return MouseInputType.wheel; + } else if (nativeType == PointerEventType.zoomPan) { + return MouseInputType.zoomPan; } return MouseInputType.unknown; } diff --git a/lib/src/input/input_converter.dart b/lib/src/input/input_converter.dart index 0aa17d5..090e2d2 100644 --- a/lib/src/input/input_converter.dart +++ b/lib/src/input/input_converter.dart @@ -31,7 +31,6 @@ class InputConverter { } /// touchable stuffs. - void pointerSignal(PointerSignalEvent event) { pointer.$process(PointerEventData( type: PointerEventType.scroll, @@ -39,6 +38,27 @@ class InputConverter { )); } + void pointerPanZoomStart(PointerPanZoomStartEvent event) { + pointer.$process(PointerEventData( + type: PointerEventType.zoomPan, + rawEvent: event, + )); + } + + void pointerPanZoomUpdate(PointerPanZoomUpdateEvent event) { + pointer.$process(PointerEventData( + type: PointerEventType.zoomPan, + rawEvent: event, + )); + } + + void pointerPanZoomEnd(PointerPanZoomEndEvent event) { + pointer.$process(PointerEventData( + type: PointerEventType.zoomPan, + rawEvent: event, + )); + } + void pointerMove(PointerMoveEvent event) { pointer.$process(PointerEventData( type: PointerEventType.move, @@ -74,4 +94,5 @@ class InputConverter { rawEvent: event, )); } + } diff --git a/lib/src/input/pointer_manager.dart b/lib/src/input/pointer_manager.dart index 2db0487..1f27a8f 100644 --- a/lib/src/input/pointer_manager.dart +++ b/lib/src/input/pointer_manager.dart @@ -54,6 +54,9 @@ class PointerManager { EventSignal get onScroll => _onScroll ??= EventSignal(); EventSignal? _onScroll; + EventSignal get onZoomPan => _onZoomPan ??= EventSignal(); + EventSignal? _onZoomPan; + EventSignal get onHover => _onHover ??= EventSignal(); EventSignal? _onHover; @@ -72,6 +75,7 @@ class PointerManager { _signalMapper[PointerEventType.cancel] = () => _onCancel; _signalMapper[PointerEventType.move] = () => _onMove; _signalMapper[PointerEventType.scroll] = () => _onScroll; + _signalMapper[PointerEventType.zoomPan] = () => _onZoomPan; /// mouse _signalMapper[PointerEventType.hover] = () => _onHover; @@ -99,6 +103,7 @@ class PointerManager { _onCancel?.removeAll(); _onMove?.removeAll(); _onScroll?.removeAll(); + _onZoomPan?.removeAll(); _onHover?.removeAll(); _onExit?.removeAll(); _onEnter?.removeAll(); diff --git a/lib/src/widgets/graphx_widget.dart b/lib/src/widgets/graphx_widget.dart index e4f7c40..3c8424b 100644 --- a/lib/src/widgets/graphx_widget.dart +++ b/lib/src/widgets/graphx_widget.dart @@ -113,6 +113,9 @@ Use `Expanded()` or `Flexible()` in Flex Widgets like Column() or Row(). onPointerCancel: converter.pointerCancel, onPointerMove: converter.pointerMove, onPointerSignal: converter.pointerSignal, + onPointerPanZoomStart: converter.pointerPanZoomStart, + onPointerPanZoomUpdate: converter.pointerPanZoomUpdate, + onPointerPanZoomEnd: converter.pointerPanZoomEnd, ), ); } diff --git a/pubspec.lock b/pubspec.lock index 19fc059..46ea5d8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,21 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: @@ -49,7 +42,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -61,7 +54,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.6" flutter_test: dependency: "direct dev" description: flutter @@ -73,63 +66,63 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.4" + version: "0.13.5" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.2" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_drawing: dependency: transitive description: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" sky_engine: dependency: transitive description: flutter @@ -141,7 +134,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -162,28 +155,28 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" vector_math: dependency: transitive description: @@ -199,5 +192,5 @@ packages: source: hosted version: "6.1.0" sdks: - dart: ">=2.17.0 <3.0.0" + dart: ">=2.18.4 <3.0.0" flutter: ">=2.11.0-0.1.pre" diff --git a/pubspec.yaml b/pubspec.yaml index d71ca2c..153bbc3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,17 +1,17 @@ name: graphx description: Render API on top of CustomPainter to power-up your Flutter apps to the next level. -version: 1.0.4 +version: 1.0.5 homepage: https://github.com/roipeker/graphx environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.18.4 <3.0.0" dependencies: flutter: sdk: flutter xml: ^6.1.0 - http: ^0.13.4 - flutter_svg: ^1.1.0 + http: ^0.13.5 + flutter_svg: ^1.1.6 dev_dependencies: flutter_test: