mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Refactored events to notifications on front-end, added prefutils to read
shared preferences.
This commit is contained in:
@@ -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(
|
||||
Reference in New Issue
Block a user