Thanks.
But as far as I can see, dependency_overrides does something completely different: it overrides a dependency with another version. And it does this not only for the project itself but also for all dependencies (and dependencies of dependencies), which are used in the project.
That is absolutely not, what I wanna do.
I want to define different dependencies for production, development and test.
For example, the test suite is only needed, when running the tests. They are not needed, when running the app in development mode or in production.
Some helper dependencies giving me some information eg. about design issues when my app runs in development mode are not needed when the app is used in production.
Or like in my example: I want to load a dependency from a different location, when in development mode than when it is build for production use.
And I want to do this, without changing my pubspec file each time.
When using dependency_overrides, it works. But you have to take it out at a latter time. And as long as you do not want override dependencies in the dependency graph, it has no benefit over changing the dependency definition itself. It is practically the same.
Thomas