title: What does an question (?) mark and dot (.) in dart language?
body: <p>say I defined ...</p>
  <pre><code>final DocumentSnapshot doc;
  </code></pre>
  <p>variable <code>doc</code> might be null so I use a question mark and dot...</p>
  <pre><code>print(widget.doc); // null
  print(widget.doc == null); // true
  print(widget.doc?.data['name']);
  </code></pre>
  <p>why <code>widget.doc?.data['name']</code> throw error <code>Tried calling: [](&quot;name&quot;)</code> instead returning <code>null</code>?</p>
  <p>for my understanding <code>?.</code> to check whether <code>null</code> and if it so will return <code>null</code></p>