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
{{ message }}
Repository navigation
artifacts class refactoring in the flutter_tool #80875
When trying to migrate artifacts.dart to null safety (context #79866) I discovered that the API is currently in a pretty bad state. Based on the type of Artifact, the caller is required to provide zero or more of the build mode, target platform, and environment enums. This has made the null safety migration awkward, since all arguments must be nullable and its up to the callsite to unit test to ensure correctness.
I think we should fix this, though not to the point of completely rewriting the library.
Given that each value of the Artifacts enum has different requirements, we should split the single enum into various different enums based on what they require to be looked up, and then create specialized lookup methods.
For example, the dartSdkPath does not require a build mode or target platform, this could be part of a "HostPlatform" artifacts:
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jonahwilliams commentedon Apr 21, 2021
WIP: #80876
github-actions commentedon Jul 14, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.