debugEmulateFlutterTesterEnvironment top-level property

bool debugEmulateFlutterTesterEnvironment

Whether the Flutter engine is running in flutter test emulation mode.

When true, the engine will emulate a specific screen size, and always use the "Ahem" font to reduce test flakiness and dependence on the test environment.

Implementation

bool get debugEmulateFlutterTesterEnvironment =>
    _debugEmulateFlutterTesterEnvironment;
void debugEmulateFlutterTesterEnvironment=(bool value)

Sets whether the Flutter engine is running in flutter test emulation mode.

Implementation

set debugEmulateFlutterTesterEnvironment(bool value) {
  _debugEmulateFlutterTesterEnvironment = value;
  if (_debugEmulateFlutterTesterEnvironment) {
    ensureImplicitViewInitialized();
    const ui.Size logicalSize = ui.Size(800.0, 600.0);
    window.debugPhysicalSizeOverride = logicalSize * window.devicePixelRatio;
  }
  debugDisableFontFallbacks = value;
}