File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 33import 'dart:collection' ;
44import 'dart:convert' ;
55import 'dart:ui' as ui;
6+ import 'dart:ui' ;
67
78import 'package:flutter/foundation.dart' ;
89import 'package:flutter/material.dart' ;
@@ -1467,7 +1468,16 @@ class _ConstraintRenderBox extends RenderBox
14671468
14681469 /// Always fill the parent layout
14691470 /// TODO will support wrap_content in the future
1470- size = constraints.constrain (const Size (double .infinity, double .infinity));
1471+
1472+ double consMaxWidth = constraints.maxWidth;
1473+ if (consMaxWidth == double .infinity) {
1474+ consMaxWidth = window.physicalSize.width;
1475+ }
1476+ double consMaxHeight = constraints.maxHeight;
1477+ if (consMaxHeight == double .infinity) {
1478+ consMaxHeight = window.physicalSize.height;
1479+ }
1480+ size = constraints.constrain (Size (consMaxWidth, consMaxHeight));
14711481
14721482 assert (() {
14731483 if (_debugCheckConstraints) {
You can’t perform that action at this time.
0 commit comments