Application/medcify/lib/models/notification_item.dart
2022-09-26 12:03:52 +05:30

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;
}
}