Skip to content

Commit 927ab03

Browse files
committed
Upgrade arrow_path to version 3.1.0
ArrowPath.make() is now deprecated, use ArrowPath.addTip() instead.
1 parent e0d80f8 commit 927ab03

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

lib/graphite_edges_painter.dart

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,16 @@ Path _defaultEdgePathBuilder(
186186
if (style.arrowType == EdgeArrowType.none) {
187187
return styledPath;
188188
}
189-
return ArrowPath.make(
190-
path: styledPath,
191-
isDoubleSided: style.arrowType == EdgeArrowType.both,
192-
tipLength: style.tipLength,
193-
tipAngle: style.tipAngle);
189+
190+
var arrowPath = ArrowPath.addTip(styledPath,
191+
tipLength: style.tipLength, tipAngle: style.tipAngle);
192+
193+
if (style.arrowType == EdgeArrowType.both) {
194+
arrowPath = ArrowPath.addTip(arrowPath,
195+
tipLength: style.tipLength, tipAngle: style.tipAngle, isBackward: true);
196+
}
197+
198+
return arrowPath;
194199
}
195200

196201
List<Offset> _smoothCorners(List<Offset> points, double radius) {

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: "direct main"
66
description:
77
name: arrow_path
8-
sha256: "07194a2f165242543e81b7fb16d86d433b52ee31adb0dc9afe9273c0a45e2d9e"
8+
sha256: "794651f27eca2e9b4749d307b1e7fb8254fb8343124cc24ee6497f3ceff94651"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.0.0"
11+
version: "3.1.0"
1212
async:
1313
dependency: transitive
1414
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
flutter:
1111
sdk: flutter
1212
touchable: ^1.0.2
13-
arrow_path: ^2.0.0
13+
arrow_path: ^3.1.0
1414

1515
dev_dependencies:
1616
flutter_test:

0 commit comments

Comments
 (0)