From bf12b265baad4cf0355f370f0f1c6cabbd48e3f2 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Thu, 12 Dec 2024 13:58:52 -0500 Subject: [PATCH] [web] Make `FLUTTER_WEB_AUTO_DETECT` false by default --- lib/web_ui/dev/steps/compile_bundle_step.dart | 8 -------- lib/web_ui/lib/src/engine/configuration.dart | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/web_ui/dev/steps/compile_bundle_step.dart b/lib/web_ui/dev/steps/compile_bundle_step.dart index b87495020cf53..4a6d75fdd09f9 100644 --- a/lib/web_ui/dev/steps/compile_bundle_step.dart +++ b/lib/web_ui/dev/steps/compile_bundle_step.dart @@ -215,10 +215,6 @@ class Dart2JSCompiler extends TestCompiler { '--disable-inlining', '--enable-asserts', - // We do not want to auto-select a renderer in tests. As of today, tests - // are designed to run in one specific mode. So instead, we specify the - // renderer explicitly. - '-DFLUTTER_WEB_AUTO_DETECT=false', '-DFLUTTER_WEB_USE_SKIA=${renderer == Renderer.canvaskit}', '-DFLUTTER_WEB_USE_SKWASM=${renderer == Renderer.skwasm}', @@ -280,10 +276,6 @@ class Dart2WasmCompiler extends TestCompiler { '--enable-asserts', '--enable-experimental-wasm-interop', - // We do not want to auto-select a renderer in tests. As of today, tests - // are designed to run in one specific mode. So instead, we specify the - // renderer explicitly. - '-DFLUTTER_WEB_AUTO_DETECT=false', '-DFLUTTER_WEB_USE_SKIA=${renderer == Renderer.canvaskit}', '-DFLUTTER_WEB_USE_SKWASM=${renderer == Renderer.skwasm}', diff --git a/lib/web_ui/lib/src/engine/configuration.dart b/lib/web_ui/lib/src/engine/configuration.dart index 50695b991875f..f8f2e4fafe8ef 100644 --- a/lib/web_ui/lib/src/engine/configuration.dart +++ b/lib/web_ui/lib/src/engine/configuration.dart @@ -167,10 +167,10 @@ class FlutterConfiguration { /// Auto detect which rendering backend to use. /// - /// Using flutter tools option "--web-renderer=auto" or not specifying one - /// would set the value to true. Otherwise, it would be false. + /// Using flutter tools option "--web-renderer=auto" would set the value to + /// true. Otherwise, it would be false. static const bool flutterWebAutoDetect = - bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: true); + bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT'); static const bool flutterWebUseSkwasm = bool.fromEnvironment('FLUTTER_WEB_USE_SKWASM');