Skip to content

Commit 14e9afc

Browse files
refactored
1 parent 783de58 commit 14e9afc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

modules/ensemble/lib/layout/list_view.dart

+8-6
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,16 @@ class ListViewState extends EWidgetState<ListView>
246246
}
247247
}
248248
if (itemWidget != null) {
249-
return index < (itemCount-1) ? Padding(
250-
padding: EdgeInsets.only(bottom: Utils.getDouble(widget._controller.gap, fallback: 0)),
251-
child: widget._controller.onItemTap == null
252-
? itemWidget
253-
: flutter.InkWell(onTap: () => _onItemTapped(index), child: itemWidget),
254-
): widget._controller.onItemTap == null
249+
Widget wrappedItem = widget._controller.onItemTap == null
255250
? itemWidget
256251
: flutter.InkWell(onTap: () => _onItemTapped(index), child: itemWidget);
252+
253+
return index < (itemCount - 1)
254+
? Padding(
255+
padding: EdgeInsets.only(bottom: Utils.getDouble(widget._controller.gap, fallback: 0)),
256+
child: wrappedItem,
257+
)
258+
: wrappedItem;
257259
}
258260
return const SizedBox.shrink();
259261
},

0 commit comments

Comments
 (0)