Timestamp.now constructor

Timestamp.now()

Creates a new timestamp with the current date, with millisecond precision.

final documentRef = firestore.doc('col/doc');

documentRef.set({'updateTime': Timestamp.now()});

Returns a new Timestamp representing the current date.

Implementation

factory Timestamp.now() => Timestamp.fromDate(DateTime.now());