Package name typed twice for hosted Pub packages

Issue

In regards to this Pub Dependencies page and this code snippet:

dependencies:
  transmogrify:
    hosted:
      name: transmogrify
      url: http://some-package-server.com

Why does the value of name exist both under dependencies and as a mapping under hosted? Are they ever different?

Solution

It was consider to remove the requirement to add the name twice, but was dropped because it didn’t seem to be used a lot and was considered a breaking change.

For more details see

If this is an issue for you just add a comment on 6677 and ask to reopen the issue.

Answered By – Günter Zöchbauer

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.