clear method

  1. @override
Future<void> clear()
override

Implementation

@override
Future<void> clear() async {
  //filter current client instance message ids
  Iterable clientMessageIds = _messageIdToClientInstanceKeyBox.keys.where(
      (key) =>
          _messageIdToClientInstanceKeyBox.get(key) == _clientInstanceKey);

  await _box.deleteAll(clientMessageIds);
}