[web] Make FLUTTER_WEB_AUTO_DETECT false by default (#160191)

Now that "auto" is not supported anymore, it makes more sense to make
this dart define false by default. And there's no need to pass
`FLUTTER_WEB_AUTO_DETECT=false` anymore.
This commit is contained in:
Mouad Debbar
2024-12-27 15:56:25 -05:00
committed by GitHub
parent afc68e3a10
commit 8731c396a7
7 changed files with 11 additions and 89 deletions

View File

@@ -217,10 +217,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}',
@@ -279,10 +275,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}',

View File

@@ -174,12 +174,9 @@ 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.
static const bool flutterWebAutoDetect = bool.fromEnvironment(
'FLUTTER_WEB_AUTO_DETECT',
defaultValue: true,
);
/// 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');
static const bool flutterWebUseSkwasm = bool.fromEnvironment('FLUTTER_WEB_USE_SKWASM');