Upgrading vector_math 1 to 2
Breaking1.4.7 → 2.4.4Breaking3Platform3Deprecated7New12Changed7Fixed6Other8
BreakingUpgrade verdict
3 breaking changes and 3 platform requirement changes.
In plain terms
- The old SimplexNoise helper is gone, so any code that still uses it will stop compiling.
- If you wrote your own class that plugs into this package's interfaces, its equality check no longer has to accept null.
- Methods used to return the object so you could chain calls. Now they return nothing, so you need to use Dart's cascade syntax to call several methods on the same object.
- You now need Dart 3.10 or newer to use this package.
Must act Top 5 of 13 that need code or config changes
Dart SDK requirement changed in 2.4.0: >=1.0.0 <2.0.0 → ^3.10.0.
What you must change
Breaking3
Removes the deprecated
SimplexNoise class.SimplexNoiseoperator == overrides no longer take nullable arguments, affecting classes that implement this package's interfaces.operator ==Removes call chaining: methods no longer return this; use the method cascade operator instead.
Platform3
Updates minimum supported SDK version to Dart 3.10.
Requires Dart 3.1.
Requires Dart v2.14 or greater.
Deprecations to plan for
Deprecated7
Deprecates most members taking dynamic arguments and adds non-dynamic replacements.
Deprecates Matrix4.translate in favor of translateByDouble, translateByVector3, and translateByVector4.
Matrix4.translateMatrix4.translateByDoubleMatrix4.translateByVector3Matrix4.translateByVector4Deprecates Matrix4.leftTranslate in favor of leftTranslateByDouble, leftTranslateByVector3, and leftTranslateByVector4.
Matrix4.leftTranslateMatrix4.leftTranslateByDoubleMatrix4.leftTranslateByVector3Matrix4.leftTranslateByVector4Deprecates Matrix4.scale in favor of scaleByDouble, scaleByVector3, and scaleByVector4.
Matrix4.scaleMatrix4.scaleByDoubleMatrix4.scaleByVector3Matrix4.scaleByVector4Deprecates Matrix4.scaled in favor of scaledByDouble, scaledByVector3, and scaledByVector4.
Matrix4.scaledMatrix4.scaledByDoubleMatrix4.scaledByVector3Matrix4.scaledByVector4Deprecates
SimplexNoise.SimplexNoiseDeprecates
hash.dart.hash.dart