Skip to content

specify assets that are for development only #5813

Description

@eukreign

It would be useful to specify some assets that should be loaded only during development and ignored when doing a release build.

I'm proposing adding a dev_assets option to flutter.yml to mimic the similar concept of dev_dependencies in the standard Dart pubspec.yaml.

This feature is in someway related #4014 in that you need a way to know in your code that dev_assets are available to use.

Activity

  1. modified the milestone: on Sep 12, 2016
  2. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Sep 12, 2016
  3. eseidelGoogle commented on Feb 8, 2017

    @eseidelGoogle
    Contributor

    Do Android or iOS OEM build systems have equivalents we should either use or match here?

    Incidentally Google internal flutter users can do something like this because they use bazel, and the flutter_application bazel rule takes a list of assets (instead of getting them from flutter.yaml). We have a very simple build system built into the flutter tool on top of flutter.yaml, sounds like this is asking for something a bit more sophisticated.

  4. added
    c: new featureNothing broken; request for a new capability
    a: assetsPackaging, accessing, or using assets
    on May 29, 2018
  5. photex commented on Aug 10, 2018

    @photex

    Are there any plans to bring the internal bazel rules for flutter out into the open source bazel?

    We are likely going to pass over flutter because we spent a lot of effort setting up that "one true build" with bazel.

  6. modified the milestones: , on Jan 7, 2020
  7. added
    P3Issues that are less important to the Flutter project
    on May 29, 2020
  8. modified the milestone: on Jun 1, 2020
  9. removed this from the milestone on Jun 16, 2020
  10. removed this from the milestone on Jul 7, 2020
  11. modified the milestone: on Jul 22, 2020
  12. removed this from the milestone on Aug 17, 2020
  13. Remigius2011 commented on Jan 9, 2023

    @Remigius2011
  14. eximius313 commented on Jul 4, 2023

    @eximius313

    Imagine having local configuration file with credentials used only by devs.
    In production this file is delivered by server environment, so the local file should not be included in the build.

  15. tcannon-disney commented on Jan 30, 2024

    @tcannon-disney

    We have a use case where we are a published package but would like to denote that some of the assets are for testing usage only. I feel like a dev_assets: section would be ideal for this kind of usage.

  16. drown0315 commented on Feb 4, 2024

    @drown0315
    Contributor

    We have a use case where we are a published package but would like to denote that some of the assets are for testing usage only. I feel like a dev_assets: section would be ideal for this kind of usage.我们有一个用例,其中我们是已发布的包,但想指出某些资产仅用于测试使用。我觉得 dev_assets: 部分非常适合这种用法。

    I faced the same scenario: I wrote a general widget package and made a golden test on a widget that required some images.

  17. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jun 30, 2025
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 projecta: assetsPackaging, accessing, or using assetsc: new featureNothing broken; request for a new capabilitycustomer: castawayteam-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