Renamed SuperellipseShape to ContinuousCornerBorder#27586
Renamed SuperellipseShape to ContinuousCornerBorder#27586Salby wants to merge 4 commits intoflutter:masterfrom Salby:continuous_corner_border
Conversation
…ipse' is misleading.
| 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)); |
There was a problem hiding this comment.
nit: this was better as before
| return side == typedOther.side | ||
| && borderRadius == typedOther.borderRadius; | ||
| final ContinuousCornerBorder typedOther = other; | ||
| return side == typedOther.side && borderRadius == typedOther.borderRadius; |
There was a problem hiding this comment.
nit: this was better on two lines as before
|
There's at least one other place in the API docs that mentions the old class name that should also get updated. |
jslavitz
left a comment
There was a problem hiding this comment.
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!
When I initially was developing
SuperellipseShapeI 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
ShapetoBorderto be more in line with the other default shapes (RoundedRectangleBorder&BeveledRectangleBorder).