getAllMessages method

List<NearbyMessage> getAllMessages()

Retrieves message and messageSent list

Implementation

List<NearbyMessage> getAllMessages() {
  List<NearbyMessage> combined = [...messages, ...messagesSent];
  combined.sort(((a, b) => a.dateTime.compareTo(a.dateTime)));
  hasNewMessages = false;
  return combined;
}