ShareReporter class
Reporter that shares events via the platform share sheet.
Useful for user-initiated reports or as a fallback when network delivery fails.
By default, send() delegates to share() so it is safe to include this
reporter in a pipeline even when automatic sending occurs.
Constructors
-
Creates a share reporter with optional customization hooks for text and filenames.
const
Properties
- fileNameBuilder → String Function(ReportEvent event)?
-
Optional custom file name builder. If null, Reporter.defaultFileName is used.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subjectPrefix → String
-
Subject prefix displayed in the share sheet (email clients, etc.).
final
- textBuilder → String Function(ReportEvent event)?
-
Optional share body builder. If null, a compact default is used.
final
Methods
-
defaultFileName(
ReportEvent event) → String -
Builds a stable, human-readable file name for a report event.
inherited
-
generateFile(
ReportEvent event, {String? fileName, Directory? directory}) → Future< File> -
Generates a JSON file representation of the
eventfor sharing or local persistence.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
ReportEvent event) → Future< bool> -
Sends a ReportEvent to the remote/system of choice.
override
-
User-initiated sharing of a ReportEvent (e.g., via share sheet).
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited