Skip to content

Improve Documentation for ResizeImage Dimensions and Usage - #154212

Merged
auto-submit[bot] merged 10 commits into
flutter:masterfrom
RamonFarizel:rf/resize-image-docs
Sep 3, 2024
Merged

Improve Documentation for ResizeImage Dimensions and Usage#154212
auto-submit[bot] merged 10 commits into
flutter:masterfrom
RamonFarizel:rf/resize-image-docs

Conversation

@RamonFarizel

@RamonFarizelRamonFarizel commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

This pull request enhances the documentation for the ResizeImage widget to provide clearer guidance on the use of the width and height parameters.

Fixes#136508

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actionsgithub-actionsBot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 27, 2024
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
RamonFarizeland others added 3 commits August 28, 2024 18:32
Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
@goderbauer
goderbauer requested review from nate-thegrate and removed request for navaronbrackeAugust 28, 2024 22:11

@nate-thegratenate-thegrate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

I sort of crammed a bunch of feedback into this tiny addition, so take a look when you have a chance :)

Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated

@nate-thegratenate-thegrate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (with optional whitespace nit)

Thanks for making the improvement here!

Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Co-authored-by: Nate Wilson <nathan.wilson1232@gmail.com>
@RamonFarizel

Copy link
Copy Markdown
ContributorAuthor

Thank you all for your support! It was nice to learn a bit more about all those details.

Comment threadpackages/flutter/lib/src/painting/image_provider.dart Outdated
Co-authored-by: Nate Wilson <nathan.wilson1232@gmail.com>

@goderbauergoderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hwh97

Copy link
Copy Markdown

@RamonFarizel@nate-thegrate Hey, Can someone confirm whether the width parameter in ResizeImage refers to logical pixels instead of physical pixels? The original issue seems to describe it differently. Any clarification would be appreciated!

@nate-thegrate

nate-thegrate commented Oct 25, 2024

Copy link
Copy Markdown
Contributor

Thank you @hwh97, this is a really good question.

If you set width: 200, the image will be 200 physical pixels wide and will also size itself to a width of 200 logical pixels if unconstrained.

This means that if the image is constrained, the width parameter will only change the width with regards to image resolution.

I apologize for the confusion—originally my feedback on this PR was focused on syntax/grammar/style guidelines and I neglected to double-check that it matched the behavior. I'll go ahead and re-open #136508.

auto-submitBot pushed a commit that referenced this pull request Oct 30, 2024
Whoever reviewed the documentation changes in #154212 neglected to double-check that the information was accurate (it was me who did this).
Fixes#136508
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit Appframeworkflutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ResizeImage should make clear in its documentation that the width represents the physical pixels and not the logical pixels

5 participants

@RamonFarizel@hwh97@nate-thegrate@goderbauer@navaronbracke