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.
Constructors
- FeedStateNotifier.new({required FeedState initialState, required String currentUserId, required MemberListStateNotifier memberList})
Properties
-
activitiesSort
→ List<
ActivitiesSort> -
no setter
- currentUserId → String
-
final
- debugState → FeedState
-
A development-only way to access
state
outside ofStateNotifier
.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) → 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.
-
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.
-
onBookmarkAdded(
BookmarkData bookmark) → void - Handles updates to the feed state when a bookmark is added or removed.
-
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.
-
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> result, QueryConfiguration<ActivitiesSort, ActivitiesFilterField> queryConfig) → void - Handles the result of a query for more activities.
-
onReactionAdded(
FeedsReactionData reaction) → void - Handles updates to the feed state when a reaction is added.
-
onReactionRemoved(
FeedsReactionData reaction) → void - Handles updates to the feed state when a reaction is removed.
-
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
changesinherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited