ContentModerationHelper class
Shared content moderation utility for admin/editor actions. Used by neom_books and neom_audio_player for suspend/delete operations.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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 -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
canModerate(
UserRole role) → bool - Returns true if the given role has moderation privileges (editor+).
-
deleteMediaItem(
AppMediaItem item) → Future< bool> - Permanently deletes an AppMediaItem from Firestore.
-
deleteReleaseItem(
AppReleaseItem item) → Future< bool> - Permanently deletes an AppReleaseItem from Firestore.
-
deleteReleaseItemWithOwnerCleanup(
AppReleaseItem item) → Future< bool> -
Permanently deletes an AppReleaseItem and cleans up every embedded
reference held by the owner (resolved via
AppReleaseItem.ownerEmail). -
showDeleteContentDialog(
BuildContext context, {required String contentName, required Future< bool> onConfirm()}) → Future<void> -
Shows delete confirmation dialog.
Calls
onConfirmif user confirms the permanent deletion. -
showSuspendContentDialog(
BuildContext context, {required String contentName, required Future< bool> onConfirm(String? reason)}) → Future<void> -
Shows suspend confirmation dialog with optional reason field.
Calls
onConfirmwith the reason text if user confirms. -
suspendMediaItem(
String mediaItemId, String moderatorId, {String? reason}) → Future< bool> - Suspends an AppMediaItem (sets isSuspended=true with audit fields).
-
suspendReleaseItem(
String releaseItemId, String moderatorId, {String? reason}) → Future< bool> - Suspends an AppReleaseItem (sets isSuspended=true with audit fields).
-
unsuspendMediaItem(
String mediaItemId) → Future< bool> - Unsuspends an AppMediaItem (reverses suspension).
-
unsuspendReleaseItem(
String releaseItemId) → Future< bool> - Unsuspends an AppReleaseItem (reverses suspension).