Place class

Data model representing a saved place.

Constructors

Place({required String id, required double lat, required double lng, required String note, required String timestamp, String? address, bool isLocal = false, bool isEncrypted = false})
Place.fromJson(Map<String, dynamic> json, {bool isLocalSource = false, bool isEncryptedSource = false})
Creates a Place from JSON map.
factory

Properties

address → String?
final
coordinates → String
Returns formatted coordinates string.
no setter
displayAddress → String
Returns the address or coordinates if address is not available.
no setter
displayTitle → String
Returns a formatted display string for the place. Now returns the full note without truncation.
no setter
formattedDate → String
Returns formatted date string.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
isEncrypted → bool
Whether this place is stored encrypted. Encrypted places are stored in a separate encrypted file.
final
isLocal → bool
Whether this place is from local assets (canned examples). Local places are read-only and cannot be deleted.
final
lat → double
final
lng → double
final
note → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shortAddress → String
Returns a short version of the address for display in limited space.
no setter
timestamp → String
final

Methods

copyWith({String? id, double? lat, double? lng, String? note, String? timestamp, String? address, bool? isLocal, bool? isEncrypted}) → Place
Creates a copy of this Place with optional field overrides.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts Place to JSON map. Note: isLocal is not serialized as it's determined by source.
toString() → String
A string representation of this object.
inherited

Operators

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