SearchResult class

SearchResult is a document that matches a search query.

Annotations
  • @freezed

Constructors

SearchResult({required String id, List<Field>? fields, List<Highlight>? highlights, @Default(0) int? score})
Default constructor
const
factory
SearchResult.fromJson(Map<String, dynamic> json)
Unmarshalls from json to SearchResult
factory

Properties

copyWith → $SearchResultCopyWith<SearchResult>
no setterinherited
fields List<Field>?
Fields are the selected fields for this document.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
highlights List<Highlight>?
Highlights describe areas within the text that specifically match the query.
no setterinherited
id String
ID is the document identifier.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
score int?
Score is a relative value for this query. Higher score is better.
no setterinherited

Methods

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

Operators

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