Skip to content

Feature Request: a way for a Dart library to refer to resources that are not Dart code #21020

Closed
@DartBot

Description

@DartBot

This issue was originally filed by @sethladd


Use case: a library needs to retrieve files inside itself and copy them to the current working directory. These files are not Dart code, instead they are text files and binary images. This library should work on the command line or as a web app or Chrome App. (that is, we can't always assume dart:io is available and we can't assume that Platform.script returns a file: URI)

Current workaround is to embed the files' content into .dart files as triple quoted strings of text or base64. This is less than ideal:

* It requires some sort of build step for the library

  • dart2js includes all of this content in its output, greatly increasing the size of the downloaded JS

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresarea-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions