title: Time Field serverTimestamp() in cloud Firestore returns null on the first snapshot
body: <p>Im reading some data(messages) from Cloud Firestore and in a document i have a <code>timestamp</code> field for time.
  I have a Stream:</p>
  <pre><code>Stream&lt;QuerySnapshot&gt; get chats {
      return chatCollection.document(roomid).collection(&quot;messages&quot;).snapshots();
    }
  </code></pre>
  <p>for getting the messages if a an update occurs in my database (ex New message).</p>
  <p>So when i start the app it reads all the data(messages) from the DB and i print them in my app.
  Here is what my console printing the messages every time i get a new snapshot:</p>
  <pre><code>D/ViewRootImpl@a0e5145[MainActivity]( 3045): MSG_RESIZED: frame=Rect(0, 0 - 1440, 2560) ci=Rect(0, 96 - 0, 1164) vi=Rect(0, 96 - 0, 1164) or=1
  D/ViewRootImpl@a0e5145[MainActivity]( 3045): Relayout returned: old=[0,0][1440,2560] new=[0,0][1440,2560] result=0x1 surface={valid=true 492514541568} changed=false
  I/flutter ( 3045): DEBUG: TEST-MESSAGE what??? 2020-10-09 22:30:12.249
  I/flutter ( 3045): DEBUG: TEST-MESSAGE λολ 2020-10-09 21:59:58.212
  I/flutter ( 3045): DEBUG: TEST-MESSAGE gamieste 2020-10-09 22:33:10.902
  I/flutter ( 3045): DEBUG: TEST-MESSAGE holly 2020-10-09 22:26:39.672
  I/flutter ( 3045): DEBUG: TEST-MESSAGE γφ 2020-10-09 22:08:47.617
  I/flutter ( 3045): DEBUG: TEST-MESSAGE ελα 2020-10-09 22:13:38.167
  I/flutter ( 3045): DEBUG: TEST-MESSAGE see re 2020-10-09 22:29:14.277
  I/flutter ( 3045): DEBUG: TEST-MESSAGE ιξι 2020-10-09 22:10:07.442
  I/flutter ( 3045): DEBUG: TEST-MESSAGE ολα καλα ρε 2020-10-09 22:05:00.703
  I/flutter ( 3045): DEBUG: TEST-MESSAGE what??? 2020-10-09 22:30:12.249
  I/flutter ( 3045): DEBUG: TEST-MESSAGE λολ 2020-10-09 21:59:58.212
  I/flutter ( 3045): DEBUG: TEST-MESSAGE gamieste 2020-10-09 22:33:10.902
  I/flutter ( 3045): DEBUG: TEST-MESSAGE holly fuck 2020-10-09 22:26:39.672
  I/flutter ( 3045): DEBUG: TEST-MESSAGE γφ 2020-10-09 22:08:47.617
  I/flutter ( 3045): DEBUG: TEST-MESSAGE ελα μου 2020-10-09 22:13:38.167
  </code></pre>
  <p>So no problem on that. The problem occurs when i add a new document(message) in my DB from my code, then immediately it gets the update from the DB and i have the new snapshot with the new list of messages. But for about 0.5 sec i get an error on the screen oh my android and then it gets normal and has loaded all messages correctly. The error is a null pointer for a specific field of the document. <strong>TIME</strong>. Time is timestamp field in my Cloud Firestore DB.</p>
  <p>So here is the error:</p>
  <pre><code>The following NoSuchMethodError was thrown building:
  The method 'toDate' was called on null.
  Receiver: null
  Tried calling: toDate()
  
  When the exception was thrown, this was the stack:
  #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
  #1      _ChatScreenState._buildMessage (package:flutter_firebase_chat_app/screens/chat/chat_screen.dart:48:43)
  #2      _ChatScreenState.build.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:flutter_firebase_chat_app/screens/chat/chat_screen.dart:226:40)
  #3      SliverChildBuilderDelegate.build (package:flutter/src/widgets/sliver.dart:448:22)
  #4      SliverMultiBoxAdaptorElement._build.&lt;anonymous closure&gt; (package:flutter/src/widgets/sliver.dart:1136:67)
  #5      _HashMap.putIfAbsent (dart:collection-patch/collection_patch.dart:140:29)
  #6      SliverMultiBoxAdaptorElement._build (package:flutter/src/widgets/sliver.dart:1136:26)
  #7      SliverMultiBoxAdaptorElement.performRebuild.processElement (package:flutter/src/widgets/sliver.dart:1082:66) 
  </code></pre>
  <p>You will see that its just a null exception. The thing is why im getting a null for a Time field only when i upload a message. And the thing is that after that the message comes again from another snapshot with <strong>no-null value</strong>!! If you look on the error code segment i have printed the whole object and in the top right corner you will see that <strong>time field has null value</strong>. I made an if statement to print the whole object whenever time field is null.</p>
  <p>So at last the thing i think is causing this is that time field is a timestamp and when i upload the data i give it a value of <code>ServerTimestamp()</code>.
  Code here:</p>
  <pre><code>Future sendMessage(Message message) async {
      if (message.senderId != AuthService.myUid) return null;
      return await chatCollection.document(roomid).collection(&quot;messages&quot;).add({
        &quot;message&quot;: message.text,
        &quot;sender&quot;: message.senderId,
        &quot;receiver&quot;: message.receiverId,
        &quot;time&quot;: FieldValue.serverTimestamp(),
        &quot;isLiked&quot;: message.isLiked,
        &quot;unread&quot;: message.unread,
      });
    }
  </code></pre>
  <p>As you can see the Time field is the only one that takes that <code>FieldValue.serverTimestamp()</code> , so i think that somehow i get snapshot of the document before the Timestamp value to field time has been assigned. And after i get it all (with the Time field being no-Null)</p>
  <p>Any ideas?</p>