tryFlush method

Future<bool> tryFlush()

Attempts to flush the pending action if one exists.

Returns true if an action was flushed, false otherwise.

Implementation

Future<bool> tryFlush() async {
  if (_lastAction == null) return false;
  await flush();
  return true;
}