Document.fromMap constructor

Document.fromMap(
  1. Map<String, dynamic> map
)

Creates a document from a map.

Implementation

factory Document.fromMap(final Map<String, dynamic> map) {
  return Document(
    id: map['id'] as String?,
    pageContent: map['pageContent'] as String,
    metadata: map['metadata'] as Map<String, dynamic>,
  );
}