utils/firestoreConverters library
Functions
-
activityDateFromJson(
Map< String, dynamic> ? date) → (DateTime?, DateTime?) - Converts a Firestore map to a Map<String, dynamic> object. Used for activities.
-
activityDateToJson(
(DateTime?, DateTime?) date) → Map< String, Timestamp> - Converts a Map<String, dynamic> object to a Firestore map. Used for activities.
-
colorFromJson(
String? colorHex) → Color - Converts a color hex string to a Color object.
-
colorToJson(
Color color) → String - Converts a Color object to a color hex string.
-
dateTimeFromJson(
Timestamp? timestamp) → DateTime? - Converts a Firestore Timestamp to a DateTime object.
-
dateTimeToJson(
DateTime? dateTime) → Timestamp? - Converts a DateTime object to a Firestore Timestamp.
-
userCreationDateFromJson(
Map? json) → DateTime? - Converts a Firestore map to DateTime object. Used for user creation date. The date is in the format of "Thu, 29 Sep 2022 10:44:56 GMT"
-
userCreationDateToJson(
DateTime? creationTime) → Map< String, dynamic> - Converts a DateTime object to a Firestore map. Used for user creation date.