Suggestion class - search library - Dart API
Suggestion
Suggestion class abstract
Suggestion is meant to provide relevant suggestions to partial queries, like "restaur", "starbu", "eiffel".
Represents a relevant response to user queries. Suggestions (please check SuggestionType) are either: Place: SuggestionType.place Query: SuggestionType.chain or SuggestionType.category
With "Place" you get data for a concrete place in the world. With "Query" something to follow-up, a way to perform more focused search.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- href → String?
-
Direct URL for precise query.
Available only for SuggestionType.chain and SuggestionType.category.
This is not supported in offline search.
Gets the direct link for Discover query.
no setter
- id → String?
-
The unique id of suggested item. It can be used to query further information.
For online search, suggestion of type SuggestionType.place
will have Suggestion.id same as Place.id.
For offline search, only suggestion of type SuggestionType.chain,
will have this property filled with identifier number of an associated chain.
For example, the chain ID "8778" corresponds to the chain name "ABC Shop".
For other types, SuggestionType.place and SuggestionType.category
this property will be null.
Gets the suggested item id.
no setter
- place → Place?
-
The suggested place.
Available only for SuggestionType.place.
Gets the suggested place item.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
The localized title for the suggestion.
Gets the localized title for the suggestion.
no setter
- type → SuggestionType
-
Type of the suggestion.
Gets the type of suggestion.
no setter
Methods
-
getHighlights(
) → Map< HighlightType, List< IndexRange> > - The text slices matching the input query.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited