shouldUpdateMatrix method

  1. @override
bool shouldUpdateMatrix(
  1. ViewConfiguration oldConfiguration
)
override

Returns whether toMatrix would return a different value for this configuration than it would for the given oldConfiguration.

Implementation

@override
bool shouldUpdateMatrix(ViewConfiguration oldConfiguration) {
  if (oldConfiguration.runtimeType != runtimeType) {
    // New configuration could have different logic, so we don't know
    // whether it will need a new transform. Return a conservative result.
    return true;
  }
  oldConfiguration as TestViewConfiguration;
  // Compare the matrices directly since they are cached.
  return oldConfiguration._paintMatrix != _paintMatrix;
}