sendLocationMessage method

void sendLocationMessage(
  1. double longitude,
  2. double latitude,
  3. String? address,
  4. String room,
)

Implementation

void sendLocationMessage(
    double longitude, double latitude, String? address, String room) {
  ChatMessage message = ChatMessage(
      id: const Uuid().v4(),
      type: MessageType.chatLocation,
      text: address ?? "",
      roomId: room,
      longitude: longitude,
      latitude: latitude,
      originality: MessageOriginality.original,
      sendTime: DateTime.now().millisecondsSinceEpoch);

  sendChatMessage(message, room);
}