ReportViewPatterns extension

Adds pattern-matching-related methods to ReportView.

on

Methods

map<TResult extends Object?>(TResult $default(_ReportView value)) → TResult

Available on ReportView, provided by the ReportViewPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ReportView value)?) → TResult?

Available on ReportView, provided by the ReportViewPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ReportView value)?, {required TResult orElse()}) → TResult

Available on ReportView, provided by the ReportViewPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String $type, int id, int eventId, ReportViewStatus status, SubjectView subject, ReasonType reportType, String reportedBy, SubjectView reporter, String? comment, DateTime createdAt, DateTime? updatedAt, DateTime? queuedAt, List<int>? actionEventIds, List<ModEventView>? actions, String? actionNote, SubjectStatusView? subjectStatus, int? relatedReportCount, ReportAssignment? assignment, QueueView? queue, bool? isMuted, Map<String, dynamic>? $unknown)?, {required TResult orElse()}) → TResult

Available on ReportView, provided by the ReportViewPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(String $type, int id, int eventId, ReportViewStatus status, SubjectView subject, ReasonType reportType, String reportedBy, SubjectView reporter, String? comment, DateTime createdAt, DateTime? updatedAt, DateTime? queuedAt, List<int>? actionEventIds, List<ModEventView>? actions, String? actionNote, SubjectStatusView? subjectStatus, int? relatedReportCount, ReportAssignment? assignment, QueueView? queue, bool? isMuted, Map<String, dynamic>? $unknown)) → TResult

Available on ReportView, provided by the ReportViewPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String $type, int id, int eventId, ReportViewStatus status, SubjectView subject, ReasonType reportType, String reportedBy, SubjectView reporter, String? comment, DateTime createdAt, DateTime? updatedAt, DateTime? queuedAt, List<int>? actionEventIds, List<ModEventView>? actions, String? actionNote, SubjectStatusView? subjectStatus, int? relatedReportCount, ReportAssignment? assignment, QueueView? queue, bool? isMuted, Map<String, dynamic>? $unknown)?) → TResult?

Available on ReportView, provided by the ReportViewPatterns extension

A variant of when that fallback to returning null