Skip to content

Bundling assets only on a specific platform (and remove assets on another platform) #65065

@fzyzcjy

Description

@fzyzcjy

NOTE: This is not a duplicate! My previous issue #64993 is closed because of wrongly marked as a duplicate. Thus I have no choice but to create it again :/

(Why not duplicate of #8230 : I want to bundle those 1MB photos only in Android. Thus, in the final .ipa file of iOS, there are no such photos taking space.)

Steps to Reproduce

Hi thanks for the wonderful Flutter! I have some images (1.1MB) that should only be used in Android, not iOS. Therefore, I want to remove those images from the IPA file in iOS. I have read the official doc, but it did not mention things like this :/

Expected results:

Give some options, such as (pubspec.yaml):

flutter:
  assets:
    android:
      - some_images_only_in_android/
    ios:
      - some_images_only_in_ios/
   all:
      - some_images_for_both/

Actual results: No such feature

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: assetsPackaging, accessing, or using assetsa: imagesLoading, displaying, rendering imagesc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttercustomer: crowdAffects or could affect many people, though not necessarily a specific customer.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 teamwould require significant investmentA PR would not be accepted without a plan for ongoing support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions