updateRow method

void updateRow(
  1. T row
)

Implementation

void updateRow(T row) {
  if (!hasPrimaryKey) {
    throw StateError(
      'updateRow called on no-PK table "$tableName". '
      'Rebuild the cache via applyTransactionUpdate or loadFromSerializable instead.',
    );
  }
  final primaryKey = decoder.getPrimaryKey(row);
  if (primaryKey != null) {
    _rowsByPrimaryKey[primaryKey] = row;
  }
  _refreshRowsNotifier();
  if (primaryKey != null && _rowNotifiers.containsKey(primaryKey)) {
    _notifyRowListeners([primaryKey]);
  }
}