@@ -145,6 +145,34 @@ void main() {
145
145
expect (diagnosticNodes[2 ].name, 'child 3' );
146
146
expect (diagnosticNodes[2 ].style, DiagnosticsTreeStyle .sparse);
147
147
});
148
+
149
+ test ('debugDescribeChildren handles a null index' , () {
150
+ final RenderBox child1 = RenderConstrainedBox (
151
+ additionalConstraints: BoxConstraints .tight (const Size (100.0 , 100.0 )),
152
+ );
153
+ final RenderBox child2 = RenderConstrainedBox (
154
+ additionalConstraints: BoxConstraints .tight (const Size (100.0 , 100.0 )),
155
+ );
156
+ final RenderBox child3 = RenderConstrainedBox (
157
+ additionalConstraints: BoxConstraints .tight (const Size (100.0 , 100.0 )),
158
+ );
159
+
160
+ final RenderBox stack = RenderIndexedStack (
161
+ index: null ,
162
+ children: < RenderBox > [child1, child2, child3],
163
+ );
164
+
165
+ final List <DiagnosticsNode > diagnosticNodes = stack.debugDescribeChildren ();
166
+
167
+ expect (diagnosticNodes[0 ].name, 'child 1' );
168
+ expect (diagnosticNodes[0 ].style, DiagnosticsTreeStyle .offstage);
169
+
170
+ expect (diagnosticNodes[1 ].name, 'child 2' );
171
+ expect (diagnosticNodes[1 ].style, DiagnosticsTreeStyle .offstage);
172
+
173
+ expect (diagnosticNodes[2 ].name, 'child 3' );
174
+ expect (diagnosticNodes[2 ].style, DiagnosticsTreeStyle .offstage);
175
+ });
148
176
});
149
177
150
178
test ('Stack in Flex can layout with no children' , () {
0 commit comments