swap method

void swap(
  1. covariant Cell<T> cell
)

swaps the inner values between this cell and that cell.

Implementation

@pragma("vm:prefer-inline")
void swap(covariant Cell<T> cell) {
  final temp = cell._val;
  cell._val = _val;
  _val = temp;
}