Impression class

A type of event that contains details about activities a user has viewed.

Tracking impressions allows you to know what activities have been shown to a user and learn what specific users are or are not not interested in.

For example, if an app often shows posts about football and the user never engages with those posts, we can conclude that we're displaying the wrong content to that user.

Annotations
  • @JsonSerializable()

Constructors

Impression({required List<Content> contentList, List<Feature>? features, FeedId? feedId, String? location, int? position, String? trackedAt, UserData? userData})
Builds an Impression.
const
Impression.fromJson(Map<String, dynamic> json)
Create a new instance from a JSON object.
factory

Properties

contentList List<Content>
The list of content the user is looking at.
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
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
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({List<Content>? contentList, List<Feature>? features, FeedId? feedId, String? location, int? position, String? trackedAt, UserData? userData}) Impression
Copies this Impression 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