Skip to content

Ability to use Flutter: New Project offline #1957

@geneus

Description

@geneus

Hello team.

I'm currently struggling to configure the extension to prefer using the cache over hitting the network due to a spotty connection.

Current workflow:

Creating a project with the New Project command keeps retrying pub get indefinitely. Due to unresolved dependencies, the UI hangs until the user cancels. The last time I checked, it retried 236 times before I quit. Running pub get via the Get Packages command produces the same results.

Expectation:

Hit the pub registry, but resolve to cache if/when packages have already been cached as per CLI or
Exit after x number of retries

Current workflow:

Cancelling the running command seems to only dismiss the toast as it still attempts to get packages.

Expectation:

Cancel the running command as the action implies or
Check cache then quit if not resolved

Initially thought "dart.pubAdditionalArgs": [ "--offline" ] or "dart.flutterAdditionalArgs": [ "--offline" ] would produced the desired outcome but that is not the case. The settings are saved but do not seem to do anything. A setting similar to this previous suggestion is an ideal method for those who want to configure offline usage. Either that or passing the --offline flag to dart.pubAdditionalArgs / dart.flutterAdditionalArgs, but I prefer the latter as they are already implemented settings.

PS: Although the dart.flutterAdditionalArgs setting is documented, VS Code says it's an unknown configuration setting.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions