getLastMessage method

NearbyMessage? getLastMessage()

Retrieves last message received

Implementation

NearbyMessage? getLastMessage() {
  hasNewMessages = false;
  try {
    return messages.last;
  } catch (_) {
    return null;
  }
}