DiaryEntry class
Represents a single personal diary entry.
Each entry includes a title, description, date, geographic position, a human-readable location name, and a list of associated photo URLs stored in Firebase Storage.
Constructors
-
DiaryEntry({required String id, required String title, required String description, required DateTime date, required double latitude, required double longitude, required String location, required List<
String> photoUrls}) - Creates a new instance of DiaryEntry.
-
DiaryEntry.fromJson(Map<
String, dynamic> json) -
Creates a DiaryEntry from a JSON map.
factory
-
DiaryEntry.fromMap(String id, Map<
String, dynamic> map) -
Creates a DiaryEntry instance from a given map and document ID.
factory
Properties
- date → DateTime
-
Date and time when the entry was created or refers to.
final
- description → String
-
Detailed description or content of the diary entry.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the diary entry.
final
- latitude → double
-
Latitude coordinate of the entry location.
final
- location → String
-
Human-readable name of the location (e.g., city or place name).
final
- longitude → double
-
Longitude coordinate of the entry location.
final
-
photoUrls
→ List<
String> -
List of photo URLs associated with the entry.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
Title of the diary entry.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the entry to a JSON-compatible map, including the document ID.
-
toMap(
) → Map< String, dynamic> - Converts the entry to a map format, useful for saving into Firestore.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited