Application/medcify/lib/models/notification_item.dart

15 lines
422 B
Dart
Raw Permalink Normal View History

2022-09-26 06:33:52 +00:00
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;
}
}