matrix4_transform
4.1.0, released yesterday by glasberg.dev
Helper math class for easily creating Matrix4 transformations.
What it does
Provides an immutable helper class to chain transformations like rotation, scaling, and translation for creating Matrix4 objects. It also includes a tween for animations and works with widgets that accept transformation parameters.
AI-written summary of version 4.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to apply complex or chained transformations to a Container or Transform widget
- You want to animate transformations using Matrix4TransformTween
Skip it when
- You are working with raw Matrix4 math performance-critical operations without chaining needs
- You need non-UI math utilities unrelated to Flutter transformations
Strengths
- Immutable API makes creating and chaining transformations straightforward
- Includes a specific Tween for animations
- Simplifies rotation and translation combinations compared to raw Matrix4 math
Weaknesses
- Matrix4Tween may not animate linearly as expected in all intermediate steps
- Limited to matrix transformation helpers
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Container(
transform:
Matrix4Transform()
.rotateDegrees(45, origin: Offset(25, 25))
.translate(x: 25)
.matrix4,
child: ...
);Alternatives
Packages that do the same job and could replace matrix4_transform.
- animated_text_kit
Flutter widget library providing a collection of ready‑to‑use text animation effects.
72Compare - sa3_liquid
Liquid implementation from simple animations 3.x
45Compare - show_up_animation
Widget that animates a child into view with optional delay and direction
56Compare - funvas
Create canvas animations based on time and math functions.
50Compare
Works with
Packages commonly used together with matrix4_transform: ones it builds on, ones built on it, and its own family.
- vector_mathmatrix4_transform depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- assorted_layout_widgetsBuilt on matrix4_transformCollection of custom layout widgets, behavioral helpers, formatters, and dialog utilities.
- align_positionedBuilt on matrix4_transformWidget that aligns, positions, sizes, rotates and transforms a child relative to its container.