Skip to content

flutter precache: explain what are "currently enabled plaforms" #144656

Closed

Description

@bartekpacia
$ flutter precache --help
Populate the Flutter tool's cache of binary artifacts.

If no explicit platform flags are provided, this command will download the artifacts for all currently enabled platforms

...

What are currently enabled platforms? Let's say I don't have any Flutter project on my machine and I run flutter precache – how are enabled platforms inferred?

On Linux, I noticed that flutter precache is equivalent to flutter precache --android --web --linux.

On macOS I noticed that flutter precache is equivalent to flutter precache --android --web --macos --ios.

So I can see the pattern (currently enabled platforms are all platforms that can be built on the current OS), but I feel like it's not explained well enough.

I think the help message should answer these doubts.

Activity

  1. stuartmorgan-g commented on Mar 6, 2024

    @stuartmorgan-g
    Contributor

    currently enabled platforms are all platforms that can be built on the current OS

    That's the default behavior, but "enabled" here is referring to the flutter config option of disabling and disabling platforms. If you can build a platform on your host OS, but you have disabled that platform via flutter config, then it's not an enabled platform.

  2. added
    in triagePresently being triaged by the triage team
    toolAffects the "flutter" command-line tool. See also t: labels.
    d: api docsIssues with https://api.flutter.dev/
    c: proposalA detailed proposal for a change to Flutter
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Mar 6, 2024
  3. bartekpacia commented on Mar 6, 2024

    @bartekpacia
    MemberAuthor

    Thank you for very quick response! This answers my original question, but I have one more now – I ran flutter config --list and it shows e.g. enable-ios: (Not set) and enable-android: (Not set), while I can build iOS and Android apps just fine. The artifacts are also there. Why is that?

    $ flutter config --list
    All Settings:
      enable-web: (Not set)
      enable-linux-desktop: true
      enable-macos-desktop: true
      enable-windows-desktop: (Not set)
      enable-android: (Not set)
      enable-ios: (Not set)
      enable-fuchsia: (Not set)
      enable-custom-devices: (Not set)
      cli-animations: (Not set)
      enable-native-assets: true
      enable-flutter-preview: (Not set)
    

    I'm on macOS Sonoma, MacBook Air M1.
    Flutter 3.20.0-13.0.pre.30 (master)

  4. stuartmorgan-g commented on Mar 6, 2024

    @stuartmorgan-g
    Contributor

    "not set" doesn't mean "false", it means you haven't set an explicit value.

  5. bartekpacia commented on Mar 6, 2024

    @bartekpacia
    MemberAuthor

    Alright, thanks. Makes sense.

    I'll also say that I did not explicitly enable enable-linux-desktop nor enable-macos-desktop (or at least I don't recall doing so). Not sure if this is expected or maybe if something automatically enables it.

  6. added
    P3Issues that are less important to the Flutter project
    triaged-toolTriaged by Flutter Tool team
    on Jun 2, 2025
  7. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jul 11, 2025
  8. added a commit that references this issue on May 26, 2026
    388b8c8
  9. added a commit that references this issue on Jun 26, 2026
    d5fb525
  10. github-actions commented on Jul 14, 2026

    @github-actions

    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.

  11. locked as resolved and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/team-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions