withConnection method

GraphRefList<E, C, U, G> withConnection({
  1. E? record,
  2. String? linkedId,
})

Implementation

GraphRefList<E, C, U, G> withConnection({E? record, String? linkedId}) {
  var id = record?.id ?? linkedId;
  if (id == null) {
    return this;
  }
  return GraphRefList(connect: [
    ..._connect,
    GraphRef<E, C, U>.connect(id) as G,
  ], disconnect: _disconnect);
}