childCount property

int? childCount

The total number of children this delegate can provide.

If null, the number of children is determined by the least index for which 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;