Skip to content

Commit 81c3bc5

Browse files
authored
Remove double.fromEnvironment from dart-define doc (flutter#124102)
Remove double.fromEnvironment from dart-define doc. Fixes flutter#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 ``` <img width="1440" alt="Screenshot 2023-04-03 at 19 31 34" src="https://user-images.githubusercontent.com/31275429/229720102-2020e1a9-c1fb-470b-89e6-ffb84096a51b.png"> 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
1 parent e2a2046 commit 81c3bc5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/flutter_tools/lib/src/runner/flutter_command.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,8 @@ abstract class FlutterCommand extends Command<void> {
603603
FlutterOptions.kDartDefinesOption,
604604
aliases: <String>[ kDartDefines ], // supported for historical reasons
605605
help: 'Additional key-value pairs that will be available as constants '
606-
'from the String.fromEnvironment, bool.fromEnvironment, int.fromEnvironment, '
607-
'and double.fromEnvironment constructors.\n'
606+
'from the String.fromEnvironment, bool.fromEnvironment, and int.fromEnvironment '
607+
'constructors.\n'
608608
'Multiple defines can be passed by repeating "--${FlutterOptions.kDartDefinesOption}" multiple times.',
609609
valueHelp: 'foo=bar',
610610
splitCommas: false,
@@ -617,7 +617,7 @@ abstract class FlutterCommand extends Command<void> {
617617
FlutterOptions.kDartDefineFromFileOption,
618618
help: 'The path of a json format file where flutter define a global constant pool. '
619619
'Json entry will be available as constants from the String.fromEnvironment, bool.fromEnvironment, '
620-
'int.fromEnvironment, and double.fromEnvironment constructors; the key and field are json values.\n'
620+
'and int.fromEnvironment constructors; the key and field are json values.\n'
621621
'Multiple defines can be passed by repeating "--${FlutterOptions.kDartDefineFromFileOption}" multiple times.',
622622
valueHelp: 'use-define-config.json',
623623
splitCommas: false,

0 commit comments

Comments
 (0)