GenericDocument class
A generic document. Contains fields and sub-documents.
- Available extensions
- Annotations
-
- @JsonSerializable(includeIfNull: false, createFactory: true, createToJson: true, explicitToJson: false)
Constructors
-
GenericDocument({required GenericDocumentNormalizedType type, List<
Field> fields = const [], List<GenericDocument> children = const [], required double? confidence, required double? confidenceWeight}) -
GenericDocument.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
children
↔ List<
GenericDocument> -
A list of sub-documents.
getter/setter pair
- confidence ↔ double?
-
Confidence in result accuracy. The value ranges from 0 to 1, higher is better.
getter/setter pair
- confidenceWeight ↔ double?
-
The weight of the confidence. Can be used to calculate the weighted average confidence of two documents.
getter/setter pair
-
fields
↔ List<
Field> -
A list of document fields.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ GenericDocumentNormalizedType
-
The type of the document.
getter/setter pair
Methods
-
childByDocumentType(
String name) → GenericDocument? -
Available on GenericDocument, provided by the GenericDocumentExtension extension
Returns a sub-document given its document type name. Returns null if not found. -
childrenByDocumentType(
String name) → List< GenericDocument> -
Available on GenericDocument, provided by the GenericDocumentExtension extension
Returns all children of generic document given its document type name. Returns null if not found. -
fieldByTypeName(
String name) → Field? -
Available on GenericDocument, provided by the GenericDocumentExtension extension
Returns a field given its local or common type name. Returns null if not found. -
fieldsByTypeName(
String name) → List< Field> -
Available on GenericDocument, provided by the GenericDocumentExtension extension
Returns all fields given a local or common field type name. -
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