debugEmulateFlutterTesterEnvironment top-level property
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;
Sets whether the Flutter engine is running in flutter test
emulation mode.
Implementation
set debugEmulateFlutterTesterEnvironment(bool value) {
_debugEmulateFlutterTesterEnvironment = value;
if (_debugEmulateFlutterTesterEnvironment) {
const ui.Size logicalSize = ui.Size(800.0, 600.0);
final EngineFlutterWindow? implicitView = EnginePlatformDispatcher.instance.implicitView;
implicitView?.debugPhysicalSizeOverride = logicalSize * implicitView.devicePixelRatio;
}
debugDisableFontFallbacks = value;
}