Skip to content

Flutter support for --dart-define in vscode plugin. #2641

@nvsravank

Description

@nvsravank

Currently the plugin allows additional arguments to be sent to all flutter commands.
While this maybe useful in some cases the utility is diminished when I am trying to use the Dart feature to send defines that can then be utilized to setup the environment correctly.

The reason for dart define is to utilize compile time variables as discussed in this article.
https://itnext.io/flutter-1-17-no-more-flavors-no-more-ios-schemas-command-argument-that-solves-everything-8b145ed4285d

Now when I add the ---define argument in vccode section for preferences/ settings, the only place to add it is in the
"Dart: Flutter Additional Args" section.
This breaks all other commands that are super useful like the automatic flutter get.

The request is to separate the --dart-define into its own setting that is they used only for the flutter run command and not for all the other flutter commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    in docs / websiteRelates to documentation, including the Dart Code website

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions