Term class

Represents an individual term/word in a place prediction.

Each term has a value (the actual word) and an offset indicating its position in the overall description string.

Example for "123 Main Street, New York":

  • Term(offset: 0, value: "123")
  • Term(offset: 4, value: "Main Street")
  • Term(offset: 17, value: "New York")

Constructors

Term({int offset = 0, String value = ""})
Creates a Term instance.
Term.fromJson(Map<String, dynamic> json)
Creates a Term from JSON data.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
offset int
Starting position of this term in the description (0-indexed)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The text value of this term
getter/setter pair

Methods

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

Operators

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