INNER CODE UNIT · Dart

actualIndex

Dimibe/grouped_list · lib/grouped_list.dart:332

      var actualIndex = index ~/ 2;
      if (index == hiddenIndex) {
        return Opacity(
          opacity: widget.useStickyGroupSeparators ? 0 : 1,
          child: _buildGroupSeparator(_sortedElements[actualIndex]),
        );
      }
      var curr = widget.groupBy(_sortedElements[actualIndex]);
      var preIndex = actualIndex + (widget.reverse ? 1 : -1);
      var prev = isValidIndex(preIndex)
          ? widget.groupBy(_sortedElements[preIndex])
          : null;
      var nextIndex = actualIndex + (widget.reverse ? -1 : 1);
      var next = isValidIndex(nextIndex)
          ? widget.groupBy(_sortedElements[nextIndex])
          : null;
      if (isSeparator(index)) {
        if (prev != curr) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…