After the deprecation of Matrix4.scale() and Matrix4.scaled(), it seems like there is no way to easily write one of the most common use-cases in Flutter anymore. There should be a replacement for uniformly scaling a matrix by a single factor in x y and z.
For example:
Widget build(BuildContext context) {
return AnimatedContainer(
// ...
transform: Matrix4.identity().scaledByFactor(active ? 2 : 1);
// ...
);
}