Skip to content

Commit e547e7a

Browse files
authored
[vector_graphics_compiler] fix a renamed method parameter lint (#8070)
An upcoming fix to `avoid_renaming_method_parameters` will flag this rename. (I updated the base class since that seems more correct.) For references, here's the fix in flight: https://dart-review.googlesource.com/c/sdk/+/394662 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [ ] I [linked to at least one issue that this PR fixes] in the description above. - [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
1 parent c77ab99 commit e547e7a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/vector_graphics_compiler/lib/src/svg/resolver.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,14 @@ class ResolvingVisitor extends Visitor<Node, AffineMatrix> {
287287
}
288288

289289
@override
290-
Node visitPatternNode(PatternNode node, AffineMatrix data) {
291-
final AttributedNode? resolvedPattern = node.resolver(node.patternId);
290+
Node visitPatternNode(PatternNode patternNode, AffineMatrix data) {
291+
final AttributedNode? resolvedPattern =
292+
patternNode.resolver(patternNode.patternId);
292293
if (resolvedPattern == null) {
293-
return node.child.accept(this, data);
294+
return patternNode.child.accept(this, data);
294295
}
295-
final Node child = node.child.accept(this, data);
296-
final AffineMatrix childTransform = node.concatTransform(data);
296+
final Node child = patternNode.child.accept(this, data);
297+
final AffineMatrix childTransform = patternNode.concatTransform(data);
297298
final Node pattern = resolvedPattern.accept(this, childTransform);
298299

299300
return ResolvedPatternNode(
@@ -304,7 +305,7 @@ class ResolvingVisitor extends Visitor<Node, AffineMatrix> {
304305
width: resolvedPattern.attributes.width!,
305306
height: resolvedPattern.attributes.height!,
306307
transform: data,
307-
id: node.patternId,
308+
id: patternNode.patternId,
308309
);
309310
}
310311

packages/vector_graphics_compiler/lib/src/svg/visitor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class Visitor<S, V> {
4545
S visitEmptyNode(Node node, V data);
4646

4747
/// Visit a [PatternNode].
48-
S visitPatternNode(PatternNode node, V data);
48+
S visitPatternNode(PatternNode patternNode, V data);
4949

5050
/// Visit a [ResolvedTextPositionNode].
5151
S visitResolvedTextPositionNode(

0 commit comments

Comments
 (0)