You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a mobile app with Flutter and I'm using packages (wakelock and package_info_plus) that in their most recent versions have a conflict in their win32 dependency. For this reason, my project fails to resolve dependencies, even though I don't care about Windows at all (this is a fact and won't change, the app makes no sense on the desktop).
Pub could know about the platforms my project supports (I specify them when I create a new project with flutter create --platforms ...) and then it could decide to not report error conditions for irrelevant ones.
The text was updated successfully, but these errors were encountered:
There was a push once to base resolution on "features" that could be enabled/disabled, but we have left that behind.
The main reasons:
Added complexity
While there might be a few times like this where a platform-specific dependency would save the day,
it comes at the cost of a cognitive overhead of enabling/disabling features, and also the implementation
cost in the pub client.
Doesn't work well with the language
Currently Dart has only very limited support for compile-time conditional inclusion. There are conditional imports, but they only condition on library-availability (web vs. non-web).
Usually it helps everybody more if there is a bigger push to keep packages compatible and up-to-date.
Hopefully the packages in question will soon be updated to be compatible, or you can try to use a dependency_overrides to force a version.
I'm writing a mobile app with Flutter and I'm using packages (
wakelock
andpackage_info_plus
) that in their most recent versions have a conflict in theirwin32
dependency. For this reason, my project fails to resolve dependencies, even though I don't care about Windows at all (this is a fact and won't change, the app makes no sense on the desktop).Pub could know about the platforms my project supports (I specify them when I create a new project with
flutter create --platforms ...
) and then it could decide to not report error conditions for irrelevant ones.The text was updated successfully, but these errors were encountered: