Skip to content

flutter create uses directory name rather than package name to check name validity #53106

@yjbanov

Description

@yjbanov

I tried to add web support to an existing mobile app. The name of the app in the pubspec.yaml is a valid package name. However, the directory that contains the package (which is derived from a git repository name) contains a dash "-" in the name. Running flutter create . in the package results in:

"xxxxx-xxxxxx" is not a valid Dart package name.

See https://dart.dev/tools/pub/pubspec#name for more information.

/cc @jonahwilliams

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions