Improve asserts around BoxConstraints
Negative constraints never make sense, so catch those too. Make RenderObject.layout's isNormalized assert use the newer more fancy debug version of isNormalized.
This commit is contained in:
@@ -39,6 +39,10 @@ class SectorConstraints extends Constraints {
|
||||
bool get isTight => minDeltaTheta >= maxDeltaTheta && minDeltaTheta >= maxDeltaTheta;
|
||||
|
||||
bool get isNormalized => minDeltaRadius <= maxDeltaRadius && minDeltaTheta <= maxDeltaTheta;
|
||||
bool get debugAssertIsNormalized {
|
||||
assert(isNormalized);
|
||||
return isNormalized;
|
||||
}
|
||||
}
|
||||
|
||||
class SectorDimensions {
|
||||
|
||||
Reference in New Issue
Block a user