Skip to content

double.fromEnvironment does not exist #124665

Description

@Mastersam07

The current dart-define docs read:

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.

Activity

  1. added
    in triagePresently being triaged by the triage team
    toolAffects the "flutter" command-line tool. See also t: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    on Apr 12, 2023
  2. exaby73 commented on Apr 12, 2023

    @exaby73
    Member

    I can see this in the following lines. Labeling the issue

    void usesDartDefineOption() {
    argParser.addMultiOption(
    FlutterOptions.kDartDefinesOption,
    aliases: <String>[ 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'
    'Multiple defines can be passed by repeating "--${FlutterOptions.kDartDefinesOption}" multiple times.',
    valueHelp: 'foo=bar',
    splitCommas: false,
    );
    useDartDefineConfigJsonFileOption();
    }
    void useDartDefineConfigJsonFileOption() {
    argParser.addMultiOption(
    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'
    'Multiple defines can be passed by repeating "--${FlutterOptions.kDartDefineFromFileOption}" multiple times.',
    valueHelp: 'use-define-config.json',
    splitCommas: false,
    );
    }

  3. removed
    in triagePresently being triaged by the triage team
    on Apr 12, 2023
  4. added a commit that references this issue on Apr 18, 2023
    81c3bc5
  5. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 19, 2023
  6. github-actions commented on May 3, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions