DocumentDto class

One document as the database API returns it: the caller's fields under data, with the system fields alongside.

Parsed by hand for the same reason as Tokens. This one had two unchecked casts and an unguarded DateTime.parse, so a document with a missing timestamp failed with FormatException: Invalid date format naming neither the field nor the document.

Constructors

DocumentDto(String id, Map<String, dynamic> data, DateTime createdAt, DateTime updatedAt)
DocumentDto.fromJson(Map<String, dynamic> json, {String what = 'A document'})
factory

Properties

createdAt → DateTime
final
data → Map<String, dynamic>
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
updatedAt → DateTime
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited