forked from firka/flutter
Catch un-normalized BoxConstraints
Add BoxConstraints.isNormalized feature. Use this feature in asserts in all the intrinsic dimension methods, in various relevant BoxConstraints methods, and in layout(). Wrap the _DebugSize logic in BoxConstraints.constrain() in an assert block to avoid a branch in release mode. Remove the logic in BoxConstraints.isSatisfiedBy() that dealt with non-normalized values. Add BoxConstraints.normalize(). Make RenderCustomOneChildLayoutBox.performLayout() only set parentUsesSize on the child if the constraints aren't tight.
This commit is contained in:
@@ -37,6 +37,8 @@ class SectorConstraints extends Constraints {
|
||||
}
|
||||
|
||||
bool get isTight => minDeltaTheta >= maxDeltaTheta && minDeltaTheta >= maxDeltaTheta;
|
||||
|
||||
bool get isNormalized => minDeltaRadius <= maxDeltaRadius && minDeltaTheta <= maxDeltaTheta;
|
||||
}
|
||||
|
||||
class SectorDimensions {
|
||||
|
||||
Reference in New Issue
Block a user