fix transform assert (#31568)

* fix transform assert
This commit is contained in:
Phil Quitslund
2019-04-25 10:56:44 -07:00
committed by GitHub
parent 36d7e79eeb
commit 5ec33654b1

View File

@@ -163,7 +163,10 @@ class MatrixUtils {
/// 0.0 before computing its bounding rect.
static Rect inverseTransformRect(Matrix4 transform, Rect rect) {
assert(rect != null);
assert(transform.determinant != 0.0);
// As exposed by `unrelated_type_equality_checks`, this assert was a no-op.
// Fixing it introduces a bunch of runtime failures; for more context see:
// https://github.com/flutter/flutter/pull/31568
// assert(transform.determinant != 0.0);
if (isIdentity(transform))
return rect;
transform = Matrix4.copy(transform)..invert();