debugAssertAllGesturesVarsUnset function

bool debugAssertAllGesturesVarsUnset(
  1. String reason
)

Returns true if none of the gestures 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 the gestures library for a complete list.

Implementation

bool debugAssertAllGesturesVarsUnset(String reason) {
  assert(() {
    if (debugPrintHitTestResults ||
        debugPrintGestureArenaDiagnostics ||
        debugPrintRecognizerCallbacksTrace ||
        debugPrintResamplingMargin) {
      throw FlutterError(reason);
    }
    return true;
  }());
  return true;
}