debugAssertAllPaintingVarsUnset function

bool debugAssertAllPaintingVarsUnset (String reason, { bool debugDisableShadowsOverride: false })

Returns true if none of the painting library debug variables have been changed.

This function is used by the test framework to ensure that debug variables haven't been inadvertently changed.

See for a complete list.

The debugDisableShadowsOverride argument can be provided to override the expected value for debugDisableShadows. (This exists because the test framework itself overrides this value in some cases.)


bool debugAssertAllPaintingVarsUnset(String reason, { bool debugDisableShadowsOverride: false }) {
  assert(() {
    if (debugDisableShadows != debugDisableShadowsOverride) {
      throw new FlutterError(reason);
    return true;
  return true;