diff --git a/lib/graphite_edges_painter.dart b/lib/graphite_edges_painter.dart index 086c8fa..2aa0864 100644 --- a/lib/graphite_edges_painter.dart +++ b/lib/graphite_edges_painter.dart @@ -186,11 +186,16 @@ Path _defaultEdgePathBuilder( if (style.arrowType == EdgeArrowType.none) { return styledPath; } - return ArrowPath.make( - path: styledPath, - isDoubleSided: style.arrowType == EdgeArrowType.both, - tipLength: style.tipLength, - tipAngle: style.tipAngle); + + var arrowPath = ArrowPath.addTip(styledPath, + tipLength: style.tipLength, tipAngle: style.tipAngle); + + if (style.arrowType == EdgeArrowType.both) { + arrowPath = ArrowPath.addTip(arrowPath, + tipLength: style.tipLength, tipAngle: style.tipAngle, isBackward: true); + } + + return arrowPath; } List _smoothCorners(List points, double radius) { diff --git a/pubspec.lock b/pubspec.lock index d014829..d5abb31 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: "direct main" description: name: arrow_path - sha256: "07194a2f165242543e81b7fb16d86d433b52ee31adb0dc9afe9273c0a45e2d9e" + sha256: "794651f27eca2e9b4749d307b1e7fb8254fb8343124cc24ee6497f3ceff94651" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.1.0" async: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 729cf30..c399897 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter touchable: ^1.0.2 - arrow_path: ^2.0.0 + arrow_path: ^3.1.0 dev_dependencies: flutter_test: