File tree Expand file tree Collapse file tree 2 files changed +865
-6
lines changed
Expand file tree Collapse file tree 2 files changed +865
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ class Constraints {
2424 this .maxWidth = double .infinity,
2525 this .minHeight = 0.0 ,
2626 this .maxHeight = double .infinity,
27- });
27+ }) : assert (minWidth >= 0 ),
28+ assert (maxWidth >= 0 ),
29+ assert (minHeight >= 0 ),
30+ assert (maxHeight >= 0 ),
31+ assert (minWidth <= maxWidth),
32+ assert (minHeight <= maxHeight);
2833
2934 /// Creates a new unconstrained [Constraints] object.
3035 const Constraints .unconstrained ()
@@ -183,11 +188,6 @@ class Dimension {
183188 /// * [isFinite] , which checks whether both dimensions are finite.
184189 static const Dimension infinite = Dimension (double .infinity, double .infinity);
185190
186- /// Whether this size encloses a non-zero area.
187- ///
188- /// Negative areas are considered empty.
189- bool get isEmpty => width <= 0.0 || height <= 0.0 ;
190-
191191 /// Removes [other] from this size.
192192 Dimension operator - (Dimension other) =>
193193 Dimension (width - other.width, height - other.height);
You can’t perform that action at this time.
0 commit comments