'parameter working in the code gives error how to solve this?

 return Message(
        isMe: identity == doc.data['senderId'],
        isNear: chatroom == 'hotspot_chat' ? isNear : true,
        senderId: doc.data['senderId'],
        senderName: doc.data['senderName'],
        messageText: doc.data['messageText'],
        destination: doc.data['destination'],
        location: messageLocation,
        timestamp: messageTimestamp,
      );
    }
  

Hay guys above is the code it gives error of the data that is in the squire brackets. enter image description here



Solution 1:[1]

edit your question with error appeared in console

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 abdelrahman abied