build method
- BuildContext context,
- int index
override
Return the child at the given index. If the child at the given index does not exist, return null.
Implementation
@override
Widget? build(BuildContext context, int index) {
if (childCount == null) {
final Widget? child = builder(context, index);
return child == null ? null : IndexedSemantics(index: index, child: child);
}
if (index < 0 || index >= childCount!) {
return null;
}
return IndexedSemantics(index: index, child: builder(context, index));
}