fromJson static method

NotificationTypeNewMessage? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static NotificationTypeNewMessage? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return NotificationTypeNewMessage(
    message: Message.fromJson(tdMapFromJson(json['message'])),
    showPreview: (json['show_preview'] as bool?) ?? false,
  );
}