@@ -74,21 +74,22 @@ class Grid extends AbstractNode {
74
74
ctx . log . warn ( "Partial columns are not supported in repeat grids." , o ) ;
75
75
}
76
76
77
- // TODO: GS: when .responsive is false, we likely have to wrap this in a SizedBox
78
-
79
- if ( ! itemIsResponsive ) {
80
- return `SingleChildScrollView(child: Wrap(` +
77
+ let str = itemIsResponsive ?
78
+ `GridView.count(` +
79
+ `mainAxisSpacing: ${ ySpacing } , crossAxisSpacing: ${ xSpacing } , ` +
80
+ `crossAxisCount: ${ colCount } , ` +
81
+ `childAspectRatio: ${ aspectRatio } , ` +
82
+ `children: [${ childDataStr } ].map((map) { ${ paramVarStr } return ${ itemStr } ; }).toList(),` +
83
+ ')'
84
+ :
85
+ `SingleChildScrollView(child: Wrap(` +
81
86
'alignment: WrapAlignment.center, ' +
82
87
`spacing: ${ xSpacing } , runSpacing: ${ ySpacing } , ` +
83
88
`children: [${ childDataStr } ].map((map) { ${ paramVarStr } return ${ itemStr } ; }).toList(),` +
84
89
'), )' ;
85
- }
86
- return `GridView.count(` +
87
- `mainAxisSpacing: ${ ySpacing } , crossAxisSpacing: ${ xSpacing } , ` +
88
- `crossAxisCount: ${ colCount } , ` +
89
- `childAspectRatio: ${ aspectRatio } , ` +
90
- `children: [${ childDataStr } ].map((map) { ${ paramVarStr } return ${ itemStr } ; }).toList(),` +
91
- ')' ;
90
+
91
+ if ( ! this . responsive ) { str = this . _addSizedBox ( str , this . xdNode . localBounds , ctx ) ; }
92
+ return str ;
92
93
}
93
94
94
95
_itemIsResponsive ( ) {
0 commit comments