File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
packages/flutter/lib/src/widgets Expand file tree Collapse file tree 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 {
12571257 childrenDelegate = SliverChildBuilderDelegate (
12581258 (BuildContext context, int index) {
12591259 final int itemIndex = index ~ / 2 ;
1260- final Widget ? widget;
12611260 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);
12711262 }
1272- return widget ;
1263+ return separatorBuilder (context, itemIndex) ;
12731264 },
12741265 findChildIndexCallback: findChildIndexCallback,
12751266 childCount: _computeActualChildCount (itemCount),
12761267 addAutomaticKeepAlives: addAutomaticKeepAlives,
12771268 addRepaintBoundaries: addRepaintBoundaries,
12781269 addSemanticIndexes: addSemanticIndexes,
1279- semanticIndexCallback: (Widget _ , int index) {
1270+ semanticIndexCallback: (Widget widget , int index) {
12801271 return index.isEven ? index ~ / 2 : null ;
12811272 },
12821273 ),
You can’t perform that action at this time.
0 commit comments