Location class

Geographic coordinates (latitude and longitude).

Represents a precise point on Earth using decimal degrees.

Example:

final location = Location(lat: 37.7749, lng: -122.4194); // San Francisco

Constructors

Location({double? lat, double? lng})
Creates a Location instance.
Location.fromJson(Map<String, dynamic> json)
Creates a Location from JSON data.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
lat double?
Latitude in decimal degrees
getter/setter pair
lng double?
Longitude in decimal degrees
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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