From 81c3bc56873a54560abbb1e64495d4f79a29f1c1 Mon Sep 17 00:00:00 2001 From: Samuel Abada Date: Tue, 18 Apr 2023 22:52:52 +0100 Subject: [PATCH] Remove double.fromEnvironment from dart-define doc (#124102) Remove double.fromEnvironment from dart-define doc. Fixes #124665 The current dart-define docs reads: ``` Additional key-value pairs that will be available as constants from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, and double.fromEnvironment constructors. ``` while dart-define-from-file reads: ``` The path of a json format file where flutter define a global constant pool. Json entry will be available as constants from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, and double.fromEnvironment constructors; the key and field are json values ``` Screenshot 2023-04-03 at 19 31 34 However, there is no fromEnvironment constructor for double. The aim of this PR is to address this by removing double.fromEnvironment from help docs as stated in --- packages/flutter_tools/lib/src/runner/flutter_command.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index 959268e3fc..7ec52fb2e8 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -603,8 +603,8 @@ abstract class FlutterCommand extends Command { FlutterOptions.kDartDefinesOption, aliases: [ kDartDefines ], // supported for historical reasons help: 'Additional key-value pairs that will be available as constants ' - 'from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, ' - 'and double.fromEnvironment constructors.\n' + 'from the String.fromEnvironment, bool.fromEnvironment, and int.fromEnvironment ' + 'constructors.\n' 'Multiple defines can be passed by repeating "--${FlutterOptions.kDartDefinesOption}" multiple times.', valueHelp: 'foo=bar', splitCommas: false, @@ -617,7 +617,7 @@ abstract class FlutterCommand extends Command { FlutterOptions.kDartDefineFromFileOption, help: 'The path of a json format file where flutter define a global constant pool. ' 'Json entry will be available as constants from the String.fromEnvironment, bool.fromEnvironment, ' - 'int.fromEnvironment, and double.fromEnvironment constructors; the key and field are json values.\n' + 'and int.fromEnvironment constructors; the key and field are json values.\n' 'Multiple defines can be passed by repeating "--${FlutterOptions.kDartDefineFromFileOption}" multiple times.', valueHelp: 'use-define-config.json', splitCommas: false,