From cfe072c3063379233dd3d07bbc00146105682ce0 Mon Sep 17 00:00:00 2001 From: Rodolfo Goulart Date: Sat, 9 Sep 2023 23:29:10 -0300 Subject: [PATCH] changed the field tags [String?] on UserNotes to [List? tags] --- .timetracker | 2 +- CHANGELOG.md | 7 +++++-- lib/model/user/notes/user.notes.dart | 10 +++++----- pubspec.yaml | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.timetracker b/.timetracker index e0efba7..b046015 100644 --- a/.timetracker +++ b/.timetracker @@ -1 +1 @@ -{"total":3077,"sessions":[{"begin":"2023-08-20T12:25:12-03:00","end":"2023-08-20T12:38:21-03:00","duration":788},{"begin":"2023-08-20T12:40:44-03:00","end":"2023-08-20T12:41:29-03:00","duration":44},{"begin":"2023-08-21T09:24:56-03:00","end":"2023-08-21T09:27:24-03:00","duration":147},{"begin":"2023-08-21T10:11:41-03:00","end":"2023-08-21T10:17:06-03:00","duration":325},{"begin":"2023-08-23T14:14:46-03:00","end":"2023-08-23T14:28:54-03:00","duration":847},{"begin":"2023-08-23T16:30:40-03:00","end":"2023-08-23T16:30:41-03:00","duration":0},{"begin":"2023-08-27T10:43:01-03:00","end":"2023-08-27T10:47:34-03:00","duration":272},{"begin":"2023-08-27T10:54:48-03:00","end":"2023-08-27T10:55:20-03:00","duration":32},{"begin":"2023-09-09T22:28:25-03:00","end":"2023-09-09T22:35:03-03:00","duration":398},{"begin":"2023-09-09T22:39:43-03:00","end":"2023-09-09T22:43:27-03:00","duration":224}]} \ No newline at end of file +{"total":3856,"sessions":[{"begin":"2023-08-20T12:25:12-03:00","end":"2023-08-20T12:38:21-03:00","duration":788},{"begin":"2023-08-20T12:40:44-03:00","end":"2023-08-20T12:41:29-03:00","duration":44},{"begin":"2023-08-21T09:24:56-03:00","end":"2023-08-21T09:27:24-03:00","duration":147},{"begin":"2023-08-21T10:11:41-03:00","end":"2023-08-21T10:17:06-03:00","duration":325},{"begin":"2023-08-23T14:14:46-03:00","end":"2023-08-23T14:28:54-03:00","duration":847},{"begin":"2023-08-23T16:30:40-03:00","end":"2023-08-23T16:30:41-03:00","duration":0},{"begin":"2023-08-27T10:43:01-03:00","end":"2023-08-27T10:47:34-03:00","duration":272},{"begin":"2023-08-27T10:54:48-03:00","end":"2023-08-27T10:55:20-03:00","duration":32},{"begin":"2023-09-09T22:28:25-03:00","end":"2023-09-09T22:35:03-03:00","duration":398},{"begin":"2023-09-09T22:39:43-03:00","end":"2023-09-09T22:43:27-03:00","duration":224},{"begin":"2023-09-09T22:49:05-03:00","end":"2023-09-09T22:55:39-03:00","duration":394},{"begin":"2023-09-09T23:13:58-03:00","end":"2023-09-09T23:17:07-03:00","duration":188},{"begin":"2023-09-09T23:25:12-03:00","end":"2023-09-09T23:28:30-03:00","duration":197}]} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c79cf0..29ad71b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ ## 0.0.3 * enum translation strings -## 0.0.3 +## 0.0.4 * add field [List? references] to UserNotes - * Field is used to store the references of the note \ No newline at end of file + * Field is used to store the references of the note + +## 0.0.5 +* changed the field tags [String?] on UserNotes to [List? tags] diff --git a/lib/model/user/notes/user.notes.dart b/lib/model/user/notes/user.notes.dart index 29c5fc9..21fe5d4 100644 --- a/lib/model/user/notes/user.notes.dart +++ b/lib/model/user/notes/user.notes.dart @@ -31,7 +31,7 @@ enum TypeNotes { class UserNotes { int id; String? title; - String? tags; + List? tags; String? notes; DateTime date; TypeNotes? type; @@ -51,7 +51,7 @@ class UserNotes { UserNotes copyWith({ int? id, String? title, - String? tags, + List? tags, String? notes, DateTime? date, TypeNotes? type, @@ -82,7 +82,7 @@ class UserNotes { return other is UserNotes && other.id == id && other.title == title && - other.tags == tags && + listEquals(other.tags, tags) && other.notes == notes && other.date == date && other.type == type && @@ -123,7 +123,7 @@ class UserNotes { result.addAll({'color': color!.value}); } if (references != null) { - result.addAll({'references': references!.map((x) => x.toMap()).toList()}); + result.addAll({'references': references!.map((x) => x?.toMap()).toList()}); } return result; @@ -133,7 +133,7 @@ class UserNotes { return UserNotes( id: map['id']?.toInt() ?? 0, title: map['title'], - tags: map['tags'], + tags: List.from(map['tags']), notes: map['notes'], date: DateTime.fromMillisecondsSinceEpoch(map['date']), type: map['type'] != null ? TypeNotes.fromMap(map['type']) : null, diff --git a/pubspec.yaml b/pubspec.yaml index 8c564b2..c5bf4f7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: aletheia_core_model description: Aletheia Core Model -version: 0.0.4 +version: 0.0.5 homepage: https://biblealetheia.com environment: