INNER CODE UNIT · Dart
hiddenIndex
Dimibe/grouped_list · lib/grouped_list.dart:313
var hiddenIndex = widget.reverse ? _sortedElements.length * 2 - 1 : 0;
var isSeparator = widget.reverse ? (int i) => i.isOdd : (int i) => i.isEven;
isValidIndex(int i) => i >= 0 && i < _sortedElements.length;
_ambiguate(WidgetsBinding.instance)!.addPostFrameCallback((_) {
_scrollListener();
});
/// The itemBuilder function for this package divides the [index] by two
/// because between each element a separator is displayed. Depending on the
/// direction of the list and if the [index] is even or odd either a item or
/// the separator widget is displayed.
///
/// If the [index] points to an separator and the previous and next items
/// are in different groups, a group header widget is displayed.
Widget itemBuilder(context, index) {
if (widget.footer != null && index == _sortedElements.length * 2) {
return widget.footer!;