StructuredFormat class

Contains a breakdown of a Place or query prediction into main text and secondary text.

For Place predictions, the main text contains the specific name of the Place. For query predictions, the main text contains the query.

The secondary text contains additional disambiguating features (such as a city or region) to further identify the Place or refine the query.

Documentation: https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/autocomplete#structuredformat

Inheritance
Available extensions
Annotations
  • @JsonSerializable()
  • @CopyWith()

Constructors

StructuredFormat.new({FormattableText? mainText, FormattableText? secondaryText})
StructuredFormat.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → _$StructuredFormatCWProxy

Available on StructuredFormat, provided by the $StructuredFormatCopyWith extension

Returns a callable class that can be used as follows: instanceOfStructuredFormat.copyWith(...).
no setter
hashCode int
The hash code for this object.
no setterinherited
mainText FormattableText?
Represents the name of the Place or query.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryText FormattableText?
Represents additional disambiguating features (such as a city or region) to further identify the Place or refine the query.
final

Methods

fromJsonList(List? jsonList) List<StructuredFormat>?
inherited
fromJsonMap(Map<String, dynamic>? json) StructuredFormat?
override
fromJsonString(String? json) StructuredFormat?
inherited
fromJsonStringList(String? jsonStringList) List<StructuredFormat>?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFieldsMask({String? parentKey}) List<String>
inherited
toJson() Map<String, dynamic>
override
toJsonMap() Map<String, dynamic>
inherited
toJsonString() String
inherited
toString() String
This is just to suggest children to implement a named constructor to support creating objects fromJson(...) and fromJsonString(...) as easy as T.build().fromJson(...) or T.build().fromJsonString(...)
inherited

Operators

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