Skip to content

Conversation

@Salby
Copy link
Contributor

@Salby Salby commented Feb 6, 2019

When I initially was developing SuperellipseShape I changed the method of calculating the shape to allow more control over the individual corners. As a result of this, it is no longer a mathematical superellipse, and it is therefore misleading to call it that.

I've changed the name to ContinuousCornerBorder because it still implies the continuity of the curved corners compared to RoundedRectangleBorder.

I changed Shape to Border to be more in line with the other default shapes (RoundedRectangleBorder & BeveledRectangleBorder).

@goderbauer goderbauer added framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository labels Feb 6, 2019
@xster xster requested a review from jslavitz February 7, 2019 02:35
Path getInnerPath(Rect rect, {TextDirection textDirection}) {
return _getPath(borderRadius.resolve(textDirection).toRRect(rect).deflate(side.width));
return _getPath(
borderRadius.resolve(textDirection).toRRect(rect).deflate(side.width));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this was better as before

return side == typedOther.side
&& borderRadius == typedOther.borderRadius;
final ContinuousCornerBorder typedOther = other;
return side == typedOther.side && borderRadius == typedOther.borderRadius;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this was better on two lines as before

@Hixie
Copy link
Contributor

Hixie commented Feb 7, 2019

There's at least one other place in the API docs that mentions the old class name that should also get updated.

Copy link
Contributor

@jslavitz jslavitz left a comment

Choose a reason for hiding this comment

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

Hey Salby! Not sure if you saw my PR: #27523. We actually ended up finding a different equation/ set of curves that builds this shape in a more suitable way. As such, we intend to revert your PR very soon and so we will be closing this PR. However, we really appreciate your contribution (you can see some of the code has made it into the new PR, as well as this marvelous naming idea!). We are really sorry to have to revert your code, but we would very much appreciate future contributions! Thanks again!

@jslavitz jslavitz closed this Feb 7, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants