Improve the SliverChildBuilderDelegate
docs for folk to troubleshoot. (#103183)
This commit is contained in:
parent
48d04b5d80
commit
da19a88ca2
@ -375,6 +375,11 @@ class SliverChildBuilderDelegate extends SliverChildDelegate {
|
|||||||
/// Should return null if asked to build a widget with a greater index than
|
/// Should return null if asked to build a widget with a greater index than
|
||||||
/// exists.
|
/// exists.
|
||||||
///
|
///
|
||||||
|
/// May result in an infinite loop or run out of memory if [childCount] is null
|
||||||
|
/// and the [builder] always provides a zero-size widget (such as `Container()`
|
||||||
|
/// or `SizedBox.shrink()`). If possible, provide children with non-zero size,
|
||||||
|
/// return null from [builder], or set a [childCount].
|
||||||
|
///
|
||||||
/// The delegate wraps the children returned by this builder in
|
/// The delegate wraps the children returned by this builder in
|
||||||
/// [RepaintBoundary] widgets.
|
/// [RepaintBoundary] widgets.
|
||||||
final NullableIndexedWidgetBuilder builder;
|
final NullableIndexedWidgetBuilder builder;
|
||||||
@ -383,6 +388,11 @@ class SliverChildBuilderDelegate extends SliverChildDelegate {
|
|||||||
///
|
///
|
||||||
/// If null, the number of children is determined by the least index for which
|
/// If null, the number of children is determined by the least index for which
|
||||||
/// [builder] returns null.
|
/// [builder] returns null.
|
||||||
|
///
|
||||||
|
/// May result in an infinite loop or run out of memory if [childCount] is null
|
||||||
|
/// and the [builder] always provides a zero-size widget (such as `Container()`
|
||||||
|
/// or `SizedBox.shrink()`). If possible, provide children with non-zero size,
|
||||||
|
/// return null from [builder], or set a [childCount].
|
||||||
final int? childCount;
|
final int? childCount;
|
||||||
|
|
||||||
/// Whether to wrap each child in an [AutomaticKeepAlive].
|
/// Whether to wrap each child in an [AutomaticKeepAlive].
|
||||||
|
Loading…
x
Reference in New Issue
Block a user