ackLastWrite method

void ackLastWrite({
  1. bool outOfOrder = false,
})

Acknowledges the most recent unanswered write (put or merge): the written data, with server values resolved (the timestamp from serverTime, an increment against the server's current value), is pushed once to every open listen that overlaps it (with its tag for a filtered listen), then the write is answered ok, as the server does.

A transaction put whose hash does not match the server's current data at its path is answered datastale instead, with nothing pushed.

Throws a StateError when a write or onDisconnect request sent before it is unanswered (use ackNextWrite). outOfOrder true skips that check, for a test that models something a server does not do; give the reason next to it.

Implementation

void ackLastWrite({bool outOfOrder = false}) => _ackWrite(
  _lastSentWrite(onDisconnect: false),
  'ackLastWrite',
  outOfOrder: outOfOrder,
);