-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Change the example code to match the code description #9088
Conversation
The code description says "Put the text in a Container" but the code itself uses a Padding widget
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.
This looks fine to me but, @DemX86, you have to run tools/refresh-code/excerpts. That's why the build is breaking.
I am sorry but I have failed to run |
I'm super sorry about the issues with WSL and windows in general. I hope to look further into the compatibility issues once I get a chance. I appreciate all of the fixes and help you provide despite those challenges though. I'd be happy to regenerate the snippets for you. Looks like we'll need to adjust a few more source examples for other steps first though to be consistent (and to avoid issues with the generated diff excerpt): step5 and step6. Would you like to update those source Thanks again for your help! |
@parlough Thanks for help! I didn’t guess that it was necessary to fix the example code of the rest steps too |
In this case I feel like the text is correct, using a container for padding is inefficient. Maybe updating the text to agree with the code would be a better fix. |
This option also exists. I think that way: the article introduces to reader only the |
What I meant to say is that the text is incorrect. But yes, this is a major rewrite to correct. I'm happy to see this PR landed so the code and text agree, but we do need to take an action item to update it to reflect the fact that the code, as written, will probably generate linter warnings for the ineffeciency of using a container when a padding widget does the job much more efficiently =) |
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.
@domesticmouse Is right and we should consider modifying the text to introduce Padding
in that section, but matching the code with the text seems good to do for now. I opened #9118 to track that improvement.
Thanks again for this and fixing those build failures!
…ter#9088) The code description says: > Put the text in a `Container` but the code itself uses a `Padding` widget --------- Co-authored-by: Brett Morgan <brettmorgan@google.com>
The code description says:
but the code itself uses a
Padding
widget