FirebaseAnalyticsLogEvent class
A subclass of LogEvent designed for integration with Firebase Analytics.
This class extends LogEvent by providing additional functionality tailored for logging events directly to Firebase Analytics. It encapsulates all necessary information for Firebase Analytics events, including optional parameters that can be sent along with each event.
Example:
var analyticsEvent = FirebaseAnalyticsLogEvent(
eventName: 'purchase',
eventMessage: 'User completed a purchase',
parameters: {'item_id': 'SKU123', 'price': '29.99'}
);
logger.log(event: analyticsEvent);
Constructors
-
FirebaseAnalyticsLogEvent({required String eventName, String? eventMessage, Map<
String, Object> ? parameters = const {}}) - Constructs a FirebaseAnalyticsLogEvent with required and optional parameters.
Properties
- eventMessage → String?
-
An optional message associated with the event, providing additional detail about the event's context or outcome.
finalinherited
- eventName → String
-
The name of the event. This is a required field and is used to identify the type of the event.
finalinherited
- hashCode → int
-
Generates a hash code based on the event name.
no setterinherited
-
parameters
→ Map<
String, Object> ? -
A map of key-value pairs containing additional parameters that provide more context to the event.
This is useful for passing additional data that may be relevant to specific logs.
finalinherited
- 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
-
toMap(
) → Map< String, dynamic> -
Converts the FirebaseAnalyticsLogEvent to a map, suitable for submission to Firebase Analytics.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Checks the equality of LogEvent instances based on the event name.
inherited