Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Apr 14, 2022

Description

This PR adds two examples for ClipRRect.
First one to illustrate basic usage.
Second one to help troubleshooting round corners misplacement.

Related Issue

#93589

Tests

Adds tests for both examples

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@flutter-dashboard flutter-dashboard bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Apr 14, 2022
@goderbauer
Copy link
Member

@bleroux Looks like the doc check is not happy with this change. Can you take a look and fix that?

@bleroux bleroux force-pushed the cliprrect_troubleshooting branch from dbe8601 to 7a3e1f2 Compare April 14, 2022 20:36
@HansMuller HansMuller requested a review from gspencergoog April 15, 2022 21:52
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Just some documentation nits here.

Copy link
Contributor

Choose a reason for hiding this comment

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

You might add a comment here about why this FittedBox is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment and replaced FittedBox with a more meaningful BoxConstraints.tight

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// This example shows various [ClipRRect] applied to containers.
/// This example shows various [ClipRRect]s applied to containers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// When [ClipRRect] is bigger than the child it contains, its rounded corners
/// When a [ClipRRect] is bigger than the child it contains, its rounded corners

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// could be drawn not where expected. Make sure that [ClipRRect] and its child
/// could be drawn in unexpected positions. Make sure that [ClipRRect] and its child

Maybe describe in what way the location is surprising.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// ### Why my ClipRRect child doesn't have rounded corners?
/// ### Why doesn't my [ClipRRect] child have rounded corners?

@bleroux bleroux force-pushed the cliprrect_troubleshooting branch from 7a3e1f2 to 6d310ca Compare April 18, 2022 04:44
@bleroux bleroux requested a review from gspencergoog April 18, 2022 06:58
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClipRRect border radius property not working on specifying height to parent widget

4 participants