AppNotification.fromJson constructor

AppNotification.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AppNotification.fromJson(Map<String, dynamic> json) =>
    AppNotification(
      id: json['id'] as String,
      title: json['title'] as String,
      body: json['body'] as String,
      imageUrl: json['imageUrl'] as String?,
      createdAt: DateTime.parse(json['createdAt'] as String),
      isRead: json['isRead'] as bool? ?? false,
    );