forked from firka/flutter
[flutter_tools] remove web defines workaround (#75361)
This commit is contained in:
@@ -164,7 +164,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
|
||||
|
||||
/// Create a debugging options instance for the current `run` or `drive` invocation.
|
||||
Future<DebuggingOptions> createDebuggingOptions(bool webMode) async {
|
||||
final BuildInfo buildInfo = await getBuildInfo(updateWebDefines: webMode);
|
||||
final BuildInfo buildInfo = await getBuildInfo();
|
||||
final int browserDebugPort = featureFlags.isWebEnabled && argResults.wasParsed('web-browser-debug-port')
|
||||
? int.parse(stringArg('web-browser-debug-port'))
|
||||
: null;
|
||||
@@ -398,7 +398,7 @@ class RunCommand extends RunCommandBase {
|
||||
}
|
||||
}
|
||||
|
||||
final BuildInfo buildInfo = await getBuildInfo(updateWebDefines: webMode);
|
||||
final BuildInfo buildInfo = await getBuildInfo();
|
||||
final String modeName = buildInfo.modeName;
|
||||
return <CustomDimensions, String>{
|
||||
CustomDimensions.commandRunIsEmulator: '$isEmulator',
|
||||
@@ -510,7 +510,7 @@ class RunCommand extends RunCommandBase {
|
||||
Future<FlutterCommandResult> runCommand() async {
|
||||
// Enable hot mode by default if `--no-hot` was not passed and we are in
|
||||
// debug mode.
|
||||
final BuildInfo buildInfo = await getBuildInfo(updateWebDefines: webMode);
|
||||
final BuildInfo buildInfo = await getBuildInfo();
|
||||
final bool hotMode = shouldUseHotMode(buildInfo);
|
||||
final String applicationBinaryPath = stringArg('use-application-binary');
|
||||
|
||||
|
||||
@@ -820,7 +820,7 @@ abstract class FlutterCommand extends Command<void> {
|
||||
///
|
||||
/// Throws a [ToolExit] if the current set of options is not compatible with
|
||||
/// each other.
|
||||
Future<BuildInfo> getBuildInfo({ BuildMode forcedBuildMode, bool updateWebDefines = true }) async {
|
||||
Future<BuildInfo> getBuildInfo({ BuildMode forcedBuildMode }) async {
|
||||
final bool trackWidgetCreation = argParser.options.containsKey('track-widget-creation') &&
|
||||
boolArg('track-widget-creation');
|
||||
|
||||
@@ -940,7 +940,7 @@ abstract class FlutterCommand extends Command<void> {
|
||||
? stringsArg(FlutterOptions.kDartDefinesOption)
|
||||
: <String>[];
|
||||
|
||||
if (argParser.options.containsKey('web-renderer') && updateWebDefines) {
|
||||
if (argParser.options.containsKey('web-renderer')) {
|
||||
dartDefines = updateDartDefines(dartDefines, stringArg('web-renderer'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user