UserNotificationItemView constructor

const UserNotificationItemView({
  1. required Person author,
  2. @JsonKey.new(name: 'notif_body') required String notifBody,
  3. @JsonKey.new(name: 'notif_id') required int notifId,
  4. @JsonKey.new(name: 'notif_subtype') required String notifSubtype,
  5. @JsonKey.new(name: 'notif_type') required int notifType,
  6. required String status,
  7. Comment? comment,
  8. @JsonKey.new(name: 'comment_view') CommentView? commentView,
  9. @JsonKey.new(name: 'comment_id') int? commentId,
  10. Community? community,
  11. PostView? post,
  12. @JsonKey.new(name: 'post_id') int? postId,
})

Implementation

const factory UserNotificationItemView({
  required Person author,
  @JsonKey(name: 'notif_body') required String notifBody,
  @JsonKey(name: 'notif_id') required int notifId,
  @JsonKey(name: 'notif_subtype') required String notifSubtype,
  @JsonKey(name: 'notif_type') required int notifType,
  required String status,
  Comment? comment,
  @JsonKey(name: 'comment_view') CommentView? commentView,
  @JsonKey(name: 'comment_id') int? commentId,
  Community? community,
  PostView? post,
  @JsonKey(name: 'post_id') int? postId,
}) = _UserNotificationItemView;