debugAssertAllServicesVarsUnset function Null safety

bool debugAssertAllServicesVarsUnset(
  1. String reason
)

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

Implementation

bool debugAssertAllServicesVarsUnset(String reason) {
  assert(() {
    if (debugKeyEventSimulatorTransitModeOverride != null) {
      throw FlutterError(reason);
    }
    if (debugProfilePlatformChannels) {
      throw FlutterError(reason);
    }
    return true;
  }());
  return true;
}