NotificationEvent.fromMap constructor

NotificationEvent.fromMap(
  1. Map map
)

Implementation

factory NotificationEvent.fromMap(Map<dynamic, dynamic> map) {
  DateTime time = DateTime.now();
  String? name = map['packageName'];
  String? message = map['message'];
  String? title = map['title'];

  return NotificationEvent(
    packageName: name,
    title: title,
    message: message,
    timeStamp: time,
  );
}