Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package:assets #868

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add package:assets #868

wants to merge 3 commits into from

Conversation

mosuem
Copy link
Member

@mosuem mosuem commented Feb 28, 2025

Adding (very experimental) package:assets.

The basic idea: Users can use the hook helpers to add assets (which sends them to this package for linking by default), StringAsset/ByteAsset to load them, and they are treeshaken in the link hook. Alternatively, asset_internal can be used to implement their own wrappers for custom asset types.

Open to a discussion about whether this should live here or in the Dart SDK (https://dart-review.googlesource.com/c/sdk/+/412920). @mkustermann @devoncarew ?


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Copy link

github-actions bot commented Feb 28, 2025

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
assets Breaking 0.0.2 0.1.0 0.1.0 ✔️
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ⚠️
File Coverage
pkgs/assets/example/assets_example.dart 💔 Not covered
pkgs/assets/hook/link.dart 💔 Not covered
pkgs/assets/lib/assets.dart 💔 Not covered
pkgs/assets/lib/assets_hook.dart 💔 Not covered
pkgs/assets/lib/assets_internal.dart 💔 Not covered
pkgs/assets/lib/src/assets.dart 💔 Not covered
pkgs/assets/lib/src/assets_internal.dart 💔 Not covered
pkgs/assets/lib/src/hook/assets_build.dart 💔 Not covered
pkgs/assets/lib/src/hook/assets_link.dart 💔 Not covered

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant