INNER CODE UNIT · Dart
nextIndex
Dimibe/grouped_list · lib/grouped_list.dart:344
var nextIndex = actualIndex + (widget.reverse ? -1 : 1);
var next = isValidIndex(nextIndex)
? widget.groupBy(_sortedElements[nextIndex])
: null;
if (isSeparator(index)) {
if (prev != curr) {
return _buildGroupSeparator(_sortedElements[actualIndex]);
}
return widget.separator;
}
return _buildItem(context, actualIndex, prev != curr, curr != next);
}
return Stack(
key: _key,
alignment: Alignment.topCenter,
children: <Widget>[
ListView.builder(