Skip to content

[vector_math] Fix out of band analysis failure - #45

Merged
Piinks merged 2 commits into
flutter:mainfrom
Piinks:fix-vector-math-transform-filter
Oct 26, 2026
Merged

Piinks merged 2 commits into
flutter:mainfrom
Piinks:fix-vector-math-transform-filter

Conversation

@Piinks

@Piinks Piinks commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Replaces transform * position[i] in TransformFilter.filterInplace with the typed transform.transform3(position[i]) and removes the stale // ignore: invalid_assignment comment.

On Dart main, the analyzer now reports argument_type_not_assignable instead of invalid_assignment. Also expands testTransformFilter to cover an affine transform (translation + per-axis scale) and bumps vector_math to 2.4.4.

Unblocks #44

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. 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.

Footnotes

  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. ↩ ↩2

@github-actions github-actions Bot added p: vector_math triage-framework Should be looked at in framework triage labels Oct 26, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces dynamic multiplication in TransformFilter.filterInplace with Matrix4.transformed3, bumps the package version to 2.4.4, and adds a test for affine transformations. Feedback suggests using transform3 instead of transformed3 to perform the transformation in-place and avoid unnecessary Vector3 allocations inside the loop.

Comment thread packages/vector_math/lib/src/vector_math_geometry/filters/transform_filter.dart Outdated
@Piinks
Piinks merged commit bc6186c into flutter:main Oct 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: vector_math triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants