When making a package, I am often confused as to whether I should use the any
constraint.
I know that for:
library packages, I should specify clear version constraints so that users of my libraries know the version of my transitive dependencies,
application packages, I should use
any
and check in mypubspec.lock
lockfile so that others can run my application,
but there is a grey area for:
applications that are meant to be extended, such as codelabs, tutorials, templates, examples, and others.
applications that also have re-usable libraries; that is, packages that have a
lib
directory for common functionality that doesn't make sense to put in a separate package, but also aweb
directory for a full-fledged application.
Question: When exactly should I use the any
version constraint, and when should I fully specify the version constraint for Pub packages?