Skip to content

Commit 3c3181c

Browse files
authored
[path_parsing] deprecate utility functions that should be private (#7993)
Towards flutter/flutter#157940
1 parent 796afa3 commit 3c3181c

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

third_party/packages/path_parsing/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.1.0
2+
3+
* Deprecates top-level utility functions `blendPoints` and `reflectedPoint` and
4+
some members in `PathSegmentData`.
5+
16
## 1.0.3
27

38
* Updates README.md.

third_party/packages/path_parsing/lib/src/path_parsing.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ class SvgPathStringSource {
411411
}
412412
}
413413

414+
@Deprecated('Utility function that should not be public.')
415+
// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
414416
_PathOffset reflectedPoint(
415417
_PathOffset reflectedIn, _PathOffset pointToReflect) {
416418
return _PathOffset(2 * reflectedIn.dx - pointToReflect.dx,
@@ -420,6 +422,8 @@ _PathOffset reflectedPoint(
420422
const double _kOneOverThree = 1.0 / 3.0;
421423

422424
/// Blend the points with a ratio (1/3):(2/3).
425+
@Deprecated('Utility function that should not be public.')
426+
// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
423427
_PathOffset blendPoints(_PathOffset p1, _PathOffset p2) {
424428
return _PathOffset((p1.dx + 2 * p2.dx) * _kOneOverThree,
425429
(p1.dy + 2 * p2.dy) * _kOneOverThree);
@@ -447,6 +451,8 @@ class PathSegmentData {
447451
arcSweep = false,
448452
arcLarge = false;
449453

454+
@Deprecated('Utility member that should not be public.')
455+
// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
450456
_PathOffset get arcRadii => point1;
451457

452458
/// Angle in degrees.
@@ -471,8 +477,17 @@ class PathSegmentData {
471477
double get y2 => point2.dy;
472478

473479
SvgPathSegType command;
480+
481+
@Deprecated('Utility member that should not be public.')
482+
// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
474483
_PathOffset targetPoint = _PathOffset.zero;
484+
485+
@Deprecated('Utility member that should not be public.')
486+
// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
475487
_PathOffset point1 = _PathOffset.zero;
488+
489+
@Deprecated('Utility member that should not be public.')
490+
// TODO(kevmoo): Remove this in the next release https://github.com/flutter/flutter/issues/157940
476491
_PathOffset point2 = _PathOffset.zero;
477492
bool arcSweep;
478493
bool arcLarge;

third_party/packages/path_parsing/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >
33
A Dart library to help with SVG Path parsing and code generation. Used by Flutter SVG.
44
repository: https://github.com/flutter/packages/tree/main/third_party/packages/path_parsing
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_parsing%22
6-
version: 1.0.3
6+
version: 1.1.0
77

88
environment:
99
sdk: ^3.3.0

0 commit comments

Comments
 (0)