Hello!
example link on https://pub.dev/packages/flutter_bloc#-example-tab-
example/lib/main.dart is points to
https://github.com/felangel/bloc/blob/master/example/lib/main.dart
but it's wrong and it should be changed to
https://github.com/felangel/bloc/blob/master/packages/flutter_bloc/example/lib/main.dart
To Reproduce
Steps to reproduce the behavior:
Go to 'https://pub.dev/packages/flutter_bloc#-example-tab-'
Click on 'example/lib/main.dart'
See 404 error
You can use a link to the subdirectory of the github repo on the homepage field of the pubspec.yaml, if the project is hosted as a part of a mono-repo.
For example the camera package has this in it's pubspec:
homepage: https://github.com/flutter/plugins/tree/master/packages/camera
Pub.dev recognizes this and makes the links work out.
This only works for github and gitlab-hosted repos I believe.
@sigurdm thanks for the tip! Shouldn't this be repository instead though? We have a collection of packages and want to link to the same homepage. I would much rather update the repository url than homepage url since we have a dedicated docs website as the homepage url.
@felangel: If you have a repository url, it will take priority over homepage for such cases, and you can have both the homepage and the git repo URLs in your pubspec.yaml. However, the repository url was meant to specify the top-level of the git repo, and while we currently support it as deep links, it may change in the future.
Most helpful comment
You can use a link to the subdirectory of the github repo on the
homepagefield of the pubspec.yaml, if the project is hosted as a part of a mono-repo.For example the camera package has this in it's pubspec:
Pub.dev recognizes this and makes the links work out.
This only works for github and gitlab-hosted repos I believe.