File tree 1 file changed +10
-0
lines changed
packages/flutter/lib/src/widgets
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,11 @@ class SliverChildBuilderDelegate extends SliverChildDelegate {
375
375
/// Should return null if asked to build a widget with a greater index than
376
376
/// exists.
377
377
///
378
+ /// May result in an infinite loop or run out of memory if [childCount] is null
379
+ /// and the [builder] always provides a zero-size widget (such as `Container()`
380
+ /// or `SizedBox.shrink()` ). If possible, provide children with non-zero size,
381
+ /// return null from [builder] , or set a [childCount] .
382
+ ///
378
383
/// The delegate wraps the children returned by this builder in
379
384
/// [RepaintBoundary] widgets.
380
385
final NullableIndexedWidgetBuilder builder;
@@ -383,6 +388,11 @@ class SliverChildBuilderDelegate extends SliverChildDelegate {
383
388
///
384
389
/// If null, the number of children is determined by the least index for which
385
390
/// [builder] returns null.
391
+ ///
392
+ /// May result in an infinite loop or run out of memory if [childCount] is null
393
+ /// and the [builder] always provides a zero-size widget (such as `Container()`
394
+ /// or `SizedBox.shrink()` ). If possible, provide children with non-zero size,
395
+ /// return null from [builder] , or set a [childCount] .
386
396
final int ? childCount;
387
397
388
398
/// Whether to wrap each child in an [AutomaticKeepAlive] .
You can’t perform that action at this time.
0 commit comments