-
Notifications
You must be signed in to change notification settings - Fork 3.4k
doc for resolution aware images #155
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
Conversation
|
cc @krisgiesing ptal |
resolution-aware-images.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention, but we should explain somewhere in here, that Flutter's build phase now automatically picks up any asset variants in subfolders that have the same name as a main asset. So if you declare my_icon.png in the example below, the build phase will automatically include 2.0x/my_icon.png and 3.0x/my_icon.png in the asset bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so the developer only needs to add my_icon.png to their flutter.yaml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you mean "the asset bundle" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When flutter builds an app it creates a bundle of assets that are accessible through the class AssetBundle (and the widget DefaultAssetBundle). Maybe we should have separate documentation on that somewhere?
|
Thanks for taking this on. I didn't realize until reading it in this context how colloquially it was worded for the benefit of the mailing list. |
|
All good. You took the time to write a detailed email, I wanted to capture that. Please feel free to tweak this doc. |
eb709fa to
9eeb01e
Compare
resolution-aware-images.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this tip down below where we talk about my_icon.
|
LGTM after moving the Tip: paragraph. |
9eeb01e to
5fd98e4
Compare
doc for resolution aware images
Bumps [examples/codelabs](https://github.com/flutter/codelabs) from `f34ebd8` to `ec39689`. - [Release notes](https://github.com/flutter/codelabs/releases) - [Commits](flutter/codelabs@f34ebd8...ec39689) --- updated-dependencies: - dependency-name: examples/codelabs dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Bump site-shared from `04a5353` to `74292e2` (#153) - io23 bring up to date (#154) - Update PULL_REQUEST_TEMPLATE.md - Update build.yml - Bump examples/codelabs from `f34ebd8` to `ec39689` (#155) - Bump github/codeql-action from 2.3.0 to 2.3.1 (#156) - Bump github/codeql-action from 2.3.1 to 2.3.2 (#159) - Bump examples/codelabs from `ec39689` to `f5011e7` (#158) - Bump examples/codelabs from `f5011e7` to `b7d1dd0` (#161) - Bump site-shared from `74292e2` to `d514327` (#160) - Bump examples/codelabs from `b7d1dd0` to `b53da25` (#163) - Update Codelabs page with NG UI lab (#162) - Update wasm landing page for I/O '23 (#157) - Bump pigeon from 9.2.5 to 10.0.0 in /examples/development/platform_integration (#166) - Bump ruby from 3.2-2-slim-bullseye to 3.2.2-slim-bullseye (#169) - Update supported-platforms.md (#168) - [web] Document new HTML embedding options. (#164) - Flutter 3.10 release notes (#170) - Enable tests on `beta` branch and update examples (#172) - Bump actions/checkout from 3.5.0 to 3.5.2 (#175) - Bump github/codeql-action from 2.3.2 to 2.3.3 (#174) - Bump examples/codelabs from `b53da25` to `af7e9a9` (#173) - Add Swift Package Manager design doc go link (#171) - Enable link check workflow (#176) - Update language version to Dart 3 in examples (#178) - wasm: small update (#180) - Add PaLM codelab (#179) - Updated breaking changes for 3.10 (#177) - Update What's New for 3.10 (#165) - Tweak to wasm page (#181) - Bump examples/codelabs from `af7e9a9` to `007143a` (#182) - Added new banner for I/O 2023 announcement (#183) - restore build.yml --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]> Co-authored-by: Parker Lougheed <[email protected]> Co-authored-by: 失魂魚 <[email protected]> Co-authored-by: Brett Morgan <[email protected]> Co-authored-by: Bernardo Ferrari <[email protected]> Co-authored-by: Dimitris Paxinos <[email protected]> Co-authored-by: Elias Yishak <[email protected]> Co-authored-by: Mouad Debbar <[email protected]> Co-authored-by: Anthony Sansone <[email protected]> Co-authored-by: Leigha Jarett <[email protected]> Co-authored-by: Victoria Ashworth <[email protected]> Co-authored-by: Loïc Sharma <[email protected]> Co-authored-by: Eilidh Southren <[email protected]> Co-authored-by: gaaclarke <[email protected]> Co-authored-by: Kevin Moore <[email protected]> Co-authored-by: Stefanie Luo <[email protected]> Co-authored-by: Chris Bracken <[email protected]> Co-authored-by: David Iglesias <[email protected]> Co-authored-by: John Ryan <[email protected]> Co-authored-by: Yegor <[email protected]> Co-authored-by: Kevin Chisholm <[email protected]> Co-authored-by: Jenn Magder <[email protected]> Co-authored-by: Tim Sneath <[email protected]>
Closes flutter/flutter#1530