Refactored events to notifications on front-end, added prefutils to read

shared  preferences.
This commit is contained in:
rzuasti
2026-03-02 13:59:50 -05:00
parent 2d64efa44b
commit e6b5594226
14 changed files with 293 additions and 38 deletions
@@ -1,6 +1,6 @@
import 'notification_type.dart';
class Event {
class Notification {
int id;
String title;
String body;
@@ -8,7 +8,7 @@ class Event {
NotificationType notificationType;
DateTime createdOn;
Event({
Notification({
required this.id,
required this.title,
required this.body,
@@ -17,7 +17,7 @@ class Event {
this.isNew = true,
});
Event.fromJson(Map<String, dynamic> json)
Notification.fromJson(Map<String, dynamic> json)
: id = json['id'] as int,
createdOn = DateTime.parse(json['created_on'] as String),
notificationType = NotificationType.fromString(