You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support negation for all boolean engine flags from the command line #193354
Currently, presence-only boolean engine flags (such as --enable-software-rendering, --trace-startup, and --verbose-logging) cannot be overridden or disabled from the command line if enabled via platform metadata (such as AndroidManifest.xml) unlike flags with values can (like --enable-impeller=true|false). Because these switches lack a negation syntax (e.g., --flag=false or --no-<flag>), the engine only checks for presence via fml::CommandLine::HasOption(), creating an asymmetric precedence model where command-line flags cannot override manifest settings without manually modifying source configuration and rebuilding.
Because of this, we should consider supporting negation for presence-only boolean engine flags so that the precedence between command line and manifest defined flags is consistent.
Possible approaches
Standardize on =true|false switches: Transition all boolean engine flags to key-value toggles (similar to --enable-impeller=true|false), allowing command-line arguments to override manifest settings using standard last-argument-wins evaluation.
Support --no-<flag> cancellation: Introduce --no-<flag> syntax support in the engine switch parser or embedder loaders (e.g., FlutterLoader) that explicitly cancels out flags previously injected by platform metadata.
Activity
camsim99 commentedon Sep 29, 2026
@gmackall pointed out that these "presence only" flags are specified as not negatable, e.g.
flutter/packages/flutter_tools/lib/src/runner/options/common_options.dart
Line 667 in 3a8e191
[Android] Refactor Intent-driven engine flags into a variant-specific…
[Android] Refactor Intent-driven engine flags into a variant-specific…