FeedStateNotifier class

Manages the state of a feed and handles state updates.

Provides methods to update the feed state in response to data changes, user interactions, and real-time events from the Stream Feeds API.

Inheritance

Constructors

FeedStateNotifier({required FeedState initialState, required String currentUserId, required MemberListStateNotifier memberList})

Properties

activitiesSort List<Sort<ActivityData>>
no setter
currentUserId String
final
debugState FeedState
A development-only way to access state outside of StateNotifier.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
If a listener has been added using addListener and hasn't been removed yet.
no setterinherited
memberList MemberListStateNotifier
final
mounted bool
Whether dispose was called or not.
no setterinherited
onError ↔ ErrorListener?
A callback for error reporting if one of the listeners added with addListener throws.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state FeedState
The current "state" of this StateNotifier.
getter/setter pairinherited
stream Stream<FeedState>
A broadcast stream representation of a StateNotifier.
no setterinherited

Methods

addListener(Listener<FeedState> listener, {bool fireImmediately = true}) → RemoveListener
Subscribes to this object.
inherited
dispose() → void
Frees all the resources associated with this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onActivityAdded(ActivityData activity, {InsertionAction insertionAction = InsertionAction.addToStart}) → void
Handles updates to the feed state when a new activity is added.
onActivityDeleted(String activityId) → void
Handles updates to the feed state when an activity is deleted.
onActivityHidden({required String activityId, required bool hidden}) → void
Handles updates to the feed state when an activity is hidden.
onActivityMarked(MarkActivityData markData) → void
Handles updates to the feed state when an activity is marked read or seen.
onActivityPinned(ActivityPinData activityPin) → void
Handles updates to the feed state when an activity is pinned.
onActivityRemoved(ActivityData activity) → void
Handles updates to the feed state when activity is removed.
onActivityUnpinned(String activityId) → void
Handles updates to the feed state when an activity is unpinned.
onActivityUpdated(ActivityData activity) → void
Handles updates to the feed state when an activity is updated.
onAggregatedActivitiesUpdated(List<AggregatedActivityData>? aggregatedActivities) → void
onBookmarkAdded(BookmarkData bookmark) → void
Handles updates to the feed state when a bookmark is added.
onBookmarkRemoved(BookmarkData bookmark) → void
Handles updates to the feed state when a bookmark is removed.
onCommentAdded(CommentData comment) → void
Handles updates to the feed state when a comment is added or removed.
onCommentRemoved(CommentData comment) → void
Handles updates to the feed state when a comment is removed.
onCommentUpdated(CommentData comment) → void
Handles updates to the feed state when a comment is updated.
onFeedDeleted() → void
Handles updates to the feed state when the feed is deleted.
onFeedUpdated(FeedData feed) → void
Handles updates to the feed state when the feed is updated.
onFollowAdded(FollowData follow) → void
Handles updates to the feed state when a follow is added.
onFollowRemoved(FollowData follow) → void
Handles updates to the feed state when a follow is removed.
onFollowRequestRemoved(String id) → void
Handles updates to the feed state when a follow request is removed.
onFollowUpdated(FollowData follow) → void
Handles updates to the feed state when a follow is updated.
onNotificationFeedUpdated(List<AggregatedActivityData>? aggregatedActivities, NotificationStatusResponse? notificationStatus) → void
Handles updates to the feed state when the notification feed is updated.
onQueryFeed(GetOrCreateFeedData result) → void
Handles the result of a query for the feed.
onQueryMoreActivities(PaginationResult<ActivityData> activities, List<AggregatedActivityData> aggregatedActivities, QueryConfiguration<ActivityData> queryConfig) → void
Handles the result of a query for more activities.
onReactionAdded(ActivityData activity, FeedsReactionData reaction) → void
Handles updates to the feed state when a reaction is added.
onReactionRemoved(ActivityData activity, FeedsReactionData reaction) → void
Handles updates to the feed state when a reaction is removed.
onReactionUpdated(ActivityData activity, FeedsReactionData reaction) → void
Handles updates to the feed state when a reaction is updated.
onUnfollow({required FeedId sourceFid, required FeedId targetFid}) → void
Handles updates to the feed state when an unfollow action occurs.
toString() String
A string representation of this object.
inherited
updateShouldNotify(FeedState old, FeedState current) bool
Whether to notify listeners or not when state changes
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited