15 lines
422 B
Dart
15 lines
422 B
Dart
import 'package:intl/intl.dart';
|
|
import 'package:medcify/helpers.dart';
|
|
|
|
class NotificationItem{
|
|
int? id;
|
|
String? message;
|
|
String? date;
|
|
|
|
NotificationItem.fromJson(Map<String, dynamic> json){
|
|
id = json["id"] ?? 0;
|
|
message = json["messageDetail"] ?? "";
|
|
String createdAt = ((json["createdAt"] ?? "") != "") ? DateFormat().format(DateTime.parse(json["createdAt"] ?? "")) : "";
|
|
date = createdAt;
|
|
}
|
|
} |