insertRow method

void insertRow(
  1. T row, {
  2. String? requestId,
})

Implementation

void insertRow(T row, {String? requestId}) {
  final primaryKey = decoder.getPrimaryKey(row);
  if (primaryKey != null) {
    _rowsByPrimaryKey[primaryKey] = row;
  } else {
    _rows.add(_CachedRow(row, requestId: requestId));
  }
  _refreshRowsNotifier();
  if (primaryKey != null && _rowNotifiers.containsKey(primaryKey)) {
    _notifyRowListeners([primaryKey]);
  }
}