ReportDraft class final
What the user entered in the report form, handed to the onSubmit
callback of LimeniaReportForm and showLimeniaReportSheet.
Build a ReportRequest from it and send it with Limenia.report:
onSubmit: (draft) => limenia.report(
ReportRequest.content(
reasonCategory: draft.reasonCategory,
reasonText: draft.reasonText,
goodFaith: draft.goodFaithConfirmed, // only with ReportSource.user, the default
content: ReportedContent(externalContentId: comment.id, contentType: 'comment'),
author: ReportedUser(comment.authorId),
),
),
- Annotations
Constructors
- ReportDraft({required String reasonCategory, String? reasonText, bool goodFaithConfirmed = false})
-
Creates a draft.
const
Properties
- goodFaithConfirmed → bool
-
Whether the user confirmed that the report is accurate and complete
(Art. 16(2)(d) DSA), see GoodFaithConfirmation. Always false while the
form does not ask for it.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- reasonCategory → String
-
Code of the chosen category, for ReportRequest.reasonCategory. It
passes ReasonCategory.isValid.
final
- reasonText → String?
-
The free text of the user as entered, for ReportRequest.reasonText.
Null if the user wrote nothing but white space. Within
ReportLimits.reasonTextLength characters.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Leaves out the text of the user, so that it never ends up in a log.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override