Geometry class

Geographic location and viewport information for a place.

Contains the precise location coordinates and the recommended viewport for displaying the place on a map.

Example:

final geometry = Geometry.fromJson(placeJson['geometry']);
final lat = geometry.location?.lat;
final lng = geometry.location?.lng;

Constructors

Geometry({Location? location, Viewport? viewport})
Creates a Geometry instance.
Geometry.fromJson(Map<String, dynamic> json)
Creates a Geometry from JSON data.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
location Location?
Precise latitude/longitude coordinates
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
viewport Viewport?
Recommended viewport for map display
getter/setter pair

Methods

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