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

AssetImage docs improvements #78088

Closed
Hixie opened this issue Mar 13, 2021 · 17 comments · Fixed by #78173
Closed

AssetImage docs improvements #78088

Hixie opened this issue Mar 13, 2021 · 17 comments · Fixed by #78173
Labels
d: api docs Issues with https://api.flutter.dev/ framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list

Comments

@Hixie
Copy link
Contributor

Hixie commented Mar 13, 2021

AssetImage docs has a "Fetching assets" section but that section doesn't actually tell you how to fetch an asset, it just tells you how to specify a name when you're not in a package.

We should have a section that talks about how to actually fetch an asset (i.e. how to use the class).

@Hixie Hixie added framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ P2 Important issues not at the top of the work list labels Mar 13, 2021
@Hixie
Copy link
Contributor Author

Hixie commented Mar 13, 2021

It can probably just point to ImageProvider, which has a "Using an ImageProvider" section.

@Swayam221
Copy link
Contributor

I would like to work on this issue. Can I please be assigned to this?

@Hixie
Copy link
Contributor Author

Hixie commented Mar 13, 2021

@Swayam221 No need to be assigned, just submit a PR! Thanks, looking forward to it!

@Swayam221
Copy link
Contributor

@Hixie

It can probably just point to ImageProvider, which has a "Using an ImageProvider" section.

So, should I just include a link to the docs for ImageProvider there?

@Hixie
Copy link
Contributor Author

Hixie commented Mar 13, 2021

Well you'd want to make the text flow nicely, and so on. I haven't looked at exactly what would need to happen, if I had, I would just make the change directly. :-) Figuring out what the change should be is 90% of the work.

@Swayam221
Copy link
Contributor

@Hixie I think if we point it to this link https://flutter.dev/docs/development/ui/assets-and-images#loading-images-1 , it will be well understandable.
Can you please guide me so that I can add an hyperlink in the src/painting/image_resolution.dart file for this?

@Hixie
Copy link
Contributor Author

Hixie commented Mar 13, 2021

I recommend starting with the contributing docs:
https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md

@Swayam221
Copy link
Contributor

@Hixie please review #78173

@mateusfccp
Copy link
Contributor

I think we could use also this issue to fix some instances of AssetImage in the ExactAssetImage documentation.

See lines 1010 and 1020 below:

Captura de Tela 2021-04-02 às 08 10 41

@Swayam221
Copy link
Contributor

@mateusfccp what do you exactly mean by 'fix some instances of AssetImage' ?

@Swayam221
Copy link
Contributor

Swayam221 commented Apr 3, 2021

@Hixie review requested on linked PR at #78173

@mateusfccp
Copy link
Contributor

mateusfccp commented Apr 3, 2021

@mateusfccp what do you exactly mean by 'fix some instances of AssetImage' ?

As it shows in the image I provided, there are some samples on the ExactAssetImage documentation that uses AssetImage instead.

@Swayam221
Copy link
Contributor

Swayam221 commented Apr 3, 2021

@mateusfccp Oh yes, I see. Should I change this as well, @Hixie ?

@Hixie
Copy link
Contributor Author

Hixie commented Apr 3, 2021

Let's keep each individual issue separate for now, it becomes more complicated when things are mixed. Separate bug, separate PR, etc.

@mateusfccp
Copy link
Contributor

@Hixie I see, I am going to open a separate PR, then. Is it a must to create an issue too?

@Hixie
Copy link
Contributor Author

Hixie commented Apr 3, 2021

It's ideal to have one issue per PR and one PR per issue at least until you are an experienced contributor. :-)

@github-actions
Copy link

github-actions bot commented Aug 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
d: api docs Issues with https://api.flutter.dev/ framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants