[path_parsing] deprecate utility functions that should be private (#7993)
Towards https://github.com/flutter/flutter/issues/157940
diff --git a/third_party/packages/path_parsing/CHANGELOG.md b/third_party/packages/path_parsing/CHANGELOG.md
index 35e7fff..976dbd0 100644
--- a/third_party/packages/path_parsing/CHANGELOG.md
+++ b/third_party/packages/path_parsing/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.1.0
+
+* Deprecates top-level utility functions `blendPoints` and `reflectedPoint` and
+ some members in `PathSegmentData`.
+
## 1.0.3
* Updates README.md.
diff --git a/third_party/packages/path_parsing/lib/src/path_parsing.dart b/third_party/packages/path_parsing/lib/src/path_parsing.dart
index 1a750a8..f7cb0f2 100644
--- a/third_party/packages/path_parsing/lib/src/path_parsing.dart
+++ b/third_party/packages/path_parsing/lib/src/path_parsing.dart
@@ -411,6 +411,8 @@
}
}
+@Deprecated('Utility function that should not be public.')
+// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
_PathOffset reflectedPoint(
_PathOffset reflectedIn, _PathOffset pointToReflect) {
return _PathOffset(2 * reflectedIn.dx - pointToReflect.dx,
@@ -420,6 +422,8 @@
const double _kOneOverThree = 1.0 / 3.0;
/// Blend the points with a ratio (1/3):(2/3).
+@Deprecated('Utility function that should not be public.')
+// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
_PathOffset blendPoints(_PathOffset p1, _PathOffset p2) {
return _PathOffset((p1.dx + 2 * p2.dx) * _kOneOverThree,
(p1.dy + 2 * p2.dy) * _kOneOverThree);
@@ -447,6 +451,8 @@
arcSweep = false,
arcLarge = false;
+ @Deprecated('Utility member that should not be public.')
+ // TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
_PathOffset get arcRadii => point1;
/// Angle in degrees.
@@ -471,8 +477,17 @@
double get y2 => point2.dy;
SvgPathSegType command;
+
+ @Deprecated('Utility member that should not be public.')
+ // TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
_PathOffset targetPoint = _PathOffset.zero;
+
+ @Deprecated('Utility member that should not be public.')
+ // TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
_PathOffset point1 = _PathOffset.zero;
+
+ @Deprecated('Utility member that should not be public.')
+ // TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
_PathOffset point2 = _PathOffset.zero;
bool arcSweep;
bool arcLarge;
diff --git a/third_party/packages/path_parsing/pubspec.yaml b/third_party/packages/path_parsing/pubspec.yaml
index a77947c..ae99c4d 100644
--- a/third_party/packages/path_parsing/pubspec.yaml
+++ b/third_party/packages/path_parsing/pubspec.yaml
@@ -3,7 +3,7 @@
A Dart library to help with SVG Path parsing and code generation. Used by Flutter SVG.
repository: https://github.com/flutter/packages/tree/main/third_party/packages/path_parsing
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_parsing%22
-version: 1.0.3
+version: 1.1.0
environment:
sdk: ^3.3.0