Replace RenderBox.compute* with RenderBox.get* and add @visibleForOverriding (#145503)
`@visibleForOverriding` + `@protected` unfortunately does not catch the case where a `compute*` method was overridden in a subtype and the overide was called in that same type's implementation. I did not add a `flutter_ignore` for this because it doesn't seem there will be false positives.
This commit is contained in:
@@ -242,8 +242,8 @@ class RenderDiagonal extends RenderBox
|
||||
@override
|
||||
Size computeDryLayout(BoxConstraints constraints) {
|
||||
const BoxConstraints childConstraints = BoxConstraints();
|
||||
final Size topLeftSize = _topLeft?.computeDryLayout(childConstraints) ?? Size.zero;
|
||||
final Size bottomRightSize = _bottomRight?.computeDryLayout(childConstraints) ?? Size.zero;
|
||||
final Size topLeftSize = _topLeft?.getDryLayout(childConstraints) ?? Size.zero;
|
||||
final Size bottomRightSize = _bottomRight?.getDryLayout(childConstraints) ?? Size.zero;
|
||||
return constraints.constrain(Size(
|
||||
topLeftSize.width + bottomRightSize.width,
|
||||
topLeftSize.height + bottomRightSize.height,
|
||||
|
||||
Reference in New Issue
Block a user