resetDeviceOverrides method

Future<void> resetDeviceOverrides()

Resets any configuration that may be been specified by applyDeviceOverrides

Only needs to be called if you are concerned about the result of applyDeviceOverrides bleeding over across tests.

Implementation

Future<void> resetDeviceOverrides() async {
  // there is an untested assumption that clearing these specific values is cheaper than
  // calling binding.window.clearAllTestValues().
  this.window.clearDevicePixelRatioTestValue();
  this.window.platformDispatcher.clearPlatformBrightnessTestValue();
  this.window.clearPaddingTestValue();
  this.window.platformDispatcher.clearTextScaleFactorTestValue();
  this.window.clearPhysicalSizeTestValue();
  await setSurfaceSize(null);
}