File tree 1 file changed +3
-12
lines changed
packages/flutter/lib/src/widgets
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -1257,26 +1257,17 @@ class ListView extends BoxScrollView {
1257
1257
childrenDelegate = SliverChildBuilderDelegate (
1258
1258
(BuildContext context, int index) {
1259
1259
final int itemIndex = index ~ / 2 ;
1260
- final Widget ? widget;
1261
1260
if (index.isEven) {
1262
- widget = itemBuilder (context, itemIndex);
1263
- } else {
1264
- widget = separatorBuilder (context, itemIndex);
1265
- assert (() {
1266
- if (widget == null ) {
1267
- throw FlutterError ('separatorBuilder cannot return null.' );
1268
- }
1269
- return true ;
1270
- }());
1261
+ return itemBuilder (context, itemIndex);
1271
1262
}
1272
- return widget ;
1263
+ return separatorBuilder (context, itemIndex) ;
1273
1264
},
1274
1265
findChildIndexCallback: findChildIndexCallback,
1275
1266
childCount: _computeActualChildCount (itemCount),
1276
1267
addAutomaticKeepAlives: addAutomaticKeepAlives,
1277
1268
addRepaintBoundaries: addRepaintBoundaries,
1278
1269
addSemanticIndexes: addSemanticIndexes,
1279
- semanticIndexCallback: (Widget _ , int index) {
1270
+ semanticIndexCallback: (Widget widget , int index) {
1280
1271
return index.isEven ? index ~ / 2 : null ;
1281
1272
},
1282
1273
),
You can’t perform that action at this time.
0 commit comments