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

add assert message for BoxShape.circle and borderRadius check #163917

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dbspoudel
Copy link
Contributor

This PR adds a assert message to enforce null borderRadius when shape is BoxShape.circle.

Fixes #158207

Pre-launch Checklist

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Feb 22, 2025
@justinmc
Copy link
Contributor

@dbspoudel Heads up that there are some failures here.

@dbspoudel
Copy link
Contributor Author

@justinmc all checks have passed. Requesting for review.

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Hi @dbspoudel thanks for contributing! I am not sure this message needs to be changed, looking at the linked issue it also does not appear to be the error message it is referring to. Can you take a look?

@dbspoudel
Copy link
Contributor Author

@Piinks Thanks for the suggestion! I've updated the message as recommended. Let me know if any further tweaks are needed. 🚀
cc @loic-sharma

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #163917 at sha 0f211f0

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Mar 16, 2025
@loic-sharma
Copy link
Member

@dbspoudel Can this be an assertion on BoxDecoration's constructor instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error if BoxDecoration has both a circle shape and a border radius
4 participants