Engagement class
A type of event that contains details about a user's interactions with an Activity.
- Annotations
-
- @JsonSerializable()
Constructors
-
Engagement({required Content content, required String label, int? score, int? boost, List<
Feature> ? features, FeedId? feedId, String? location, int? position, String? trackedAt, UserData? userData}) -
Builds an Engagement.
const
-
Engagement.fromJson(Map<
String, dynamic> json) -
Create a new instance from a json
factory
Properties
- boost → int?
-
An integer that multiplies the score of the interaction (eg. 2 or -1)
final
- content → Content
-
The ID of the content that the user clicked
Activity ID
final
-
features
→ List<
Feature> ? -
The feature that is being tracked.
finalinherited
- feedId → FeedId?
-
The feed the user is looking at
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
The type of event (i.e. click, share, search, etc.)
final
- location → String?
-
The location of the content in your app.
finalinherited
- position → int?
-
The position in a list of activities.
finalinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- score → int?
-
Score between 0 and 100 indicating the importance of this event.
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - trackedAt → String?
-
The time at which this event as been tracked.
final
- userData → UserData?
-
The user data of the event.
finalinherited
Methods
-
copyWith(
{Content? content, String? label, int? score, int? boost, List< Feature> ? features, FeedId? feedId, String? location, int? position, String? trackedAt, UserData? userData}) → Engagement - Copies this Engagement to a new instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialize to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited