Skip to content

Commit 18fe786

Browse files
[path_parsing] Fix deprecation lints (flutter#12704)
Part of flutter#178120 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 955fd5d commit 18fe786

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎third_party/packages/path_parsing/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NEXT
22

33
* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
4+
* Fixes deprecation lints and updates minimum vector_math dependency.
45

56
## 1.1.0
67

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ class SvgPathNormalizer {
653653
}
654654
pointTransform.setIdentity();
655655

656-
pointTransform.scale(1.0 / rx, 1.0 / ry);
656+
pointTransform.scaleByDouble(1.0 / rx, 1.0 / ry, 1.0 / rx, 1);
657657
pointTransform.rotateZ(-angle);
658658

659659
_PathOffset point1 = _mapPoint(pointTransform, currentPoint);
@@ -687,7 +687,7 @@ class SvgPathNormalizer {
687687

688688
pointTransform.setIdentity();
689689
pointTransform.rotateZ(angle);
690-
pointTransform.scale(rx, ry);
690+
pointTransform.scaleByDouble(rx, ry, rx, 1);
691691

692692
// Some results of atan2 on some platform implementations are not exact
693693
// enough. So that we get more cubic curves than expected here. Adding 0.001f

‎third_party/packages/path_parsing/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010

1111
dependencies:
1212
meta: ^1.3.0
13-
vector_math: ^2.1.0
13+
vector_math: ^2.2.0
1414

1515
dev_dependencies:
1616
path: ^1.8.0

0 commit comments

Comments
 (0)