insertRowAt method

void insertRowAt(
  1. int index,
  2. T value
)

Insert value near visible index (clamped). With a filter active the row lands next to the corresponding master row.

Implementation

void insertRowAt(int index, T value) => _structural(() {
      final master = (index >= 0 && index < _viewMaster.length) ? _viewMaster[index] : _all.length;
      _all.insert(master.clamp(0, _all.length), value);
    });