INNER CODE UNIT · Dart

preIndex

Dimibe/grouped_list · lib/grouped_list.dart:340

      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) {
          return _buildGroupSeparator(_sortedElements[actualIndex]);
        }
        return widget.separator;
      }
      return _buildItem(context, actualIndex, prev != curr, curr != next);
    }

    return Stack(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…