File tree Expand file tree Collapse file tree 16 files changed +44
-31
lines changed
packages/stream_feeds/lib/src/state
sample_app/lib/screens/home/widgets Expand file tree Collapse file tree 16 files changed +44
-31
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ class Activity with Disposable {
7979
8080 late final ActivityCommentList _commentsList;
8181
82- StateNotifier <ActivityState > get state => _stateNotifier;
82+ ActivityState get state => _stateNotifier.value;
83+ StateNotifier <ActivityState > get notifier => _stateNotifier;
8384 Stream <ActivityState > get stream => _stateNotifier.stream;
8485 late final ActivityStateNotifier _stateNotifier;
8586
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ class ActivityList with Disposable {
4444
4545 late final ActivityListStateNotifier _stateNotifier;
4646
47- StateNotifier <ActivityListState > get state => _stateNotifier;
47+ ActivityListState get state => notifier.value;
48+ StateNotifier <ActivityListState > get notifier => _stateNotifier;
4849 Stream <ActivityListState > get stream => _stateNotifier.stream;
4950
5051 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -43,11 +43,12 @@ class ActivityReactionList extends Disposable {
4343 final ActivityReactionsQuery query;
4444 final ActivitiesRepository activitiesRepository;
4545
46- StateNotifier <ActivityReactionListState > get state => notifier;
47- Stream <ActivityReactionListState > get stream => notifier.stream;
46+ ActivityReactionListState get state => stateNotifier.value;
47+ StateNotifier <ActivityReactionListState > get notifier => stateNotifier;
48+ Stream <ActivityReactionListState > get stream => stateNotifier.stream;
4849
4950 @internal
50- ActivityReactionListStateNotifier get notifier => _stateNotifier;
51+ ActivityReactionListStateNotifier get stateNotifier => _stateNotifier;
5152 late final ActivityReactionListStateNotifier _stateNotifier;
5253
5354 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ class BookmarkFolderList extends Disposable {
4040 final BookmarkFoldersQuery query;
4141 final BookmarksRepository bookmarksRepository;
4242
43- StateNotifier <BookmarkFolderListState > get state => notifier;
44- Stream <BookmarkFolderListState > get stream => notifier.stream;
43+ BookmarkFolderListState get state => stateNotifier.value;
44+ StateNotifier <BookmarkFolderListState > get notifier => stateNotifier;
45+ Stream <BookmarkFolderListState > get stream => stateNotifier.stream;
4546
4647 @internal
47- BookmarkFolderListStateNotifier get notifier => _stateNotifier;
48+ BookmarkFolderListStateNotifier get stateNotifier => _stateNotifier;
4849 late final BookmarkFolderListStateNotifier _stateNotifier;
4950
5051 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ class BookmarkList with Disposable {
4040 final BookmarksRepository bookmarksRepository;
4141
4242 late final BookmarkListStateNotifier _stateNotifier;
43-
44- StateNotifier <BookmarkListState > get state => _stateNotifier;
43+
44+ BookmarkListState get state => _stateNotifier.value;
45+ StateNotifier <BookmarkListState > get notifier => _stateNotifier;
4546 Stream <BookmarkListState > get stream => _stateNotifier.stream;
4647
4748 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -38,11 +38,12 @@ class CommentList extends Disposable {
3838 final CommentsQuery query;
3939 final CommentsRepository commentsRepository;
4040
41- StateNotifier <CommentListState > get state => notifier;
42- Stream <CommentListState > get stream => notifier.stream;
41+ CommentListState get state => stateNotifier.value;
42+ StateNotifier <CommentListState > get notifier => stateNotifier;
43+ Stream <CommentListState > get stream => stateNotifier.stream;
4344
4445 @internal
45- CommentListStateNotifier get notifier => _stateNotifier;
46+ CommentListStateNotifier get stateNotifier => _stateNotifier;
4647 late final CommentListStateNotifier _stateNotifier;
4748
4849 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ class CommentReactionList with Disposable {
4040 final CommentsRepository commentsRepository;
4141
4242 late final CommentReactionListStateNotifier _stateNotifier;
43-
44- StateNotifier <CommentReactionListState > get state => _stateNotifier;
43+
44+ CommentReactionListState get state => _stateNotifier.value;
45+ StateNotifier <CommentReactionListState > get notifier => _stateNotifier;
4546 Stream <CommentReactionListState > get stream => _stateNotifier.stream;
4647
4748 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ class CommentReplyList with Disposable {
4242 final CommentsRepository commentsRepository;
4343
4444 late final CommentReplyListStateNotifier _stateNotifier;
45-
46- StateNotifier <CommentReplyListState > get state => _stateNotifier;
45+
46+ CommentReplyListState get state => _stateNotifier.value;
47+ StateNotifier <CommentReplyListState > get notifier => _stateNotifier;
4748 Stream <CommentReplyListState > get stream => _stateNotifier.stream;
4849
4950 final SharedEmitter <WsEvent > eventsEmitter;
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class Feed with Disposable {
5959 _stateNotifier = FeedStateNotifier (
6060 initialState: FeedState (fid: fid, feedQuery: query),
6161 currentUserId: currentUserId,
62- memberList: _memberList.notifier ,
62+ memberList: _memberList.stateNotifier ,
6363 );
6464
6565 // Attach event handlers for the feed events
@@ -79,7 +79,7 @@ class Feed with Disposable {
7979
8080 late final MemberList _memberList;
8181
82- FeedState get state => _stateNotifier.state ;
82+ FeedState get state => _stateNotifier.value ;
8383 StateNotifier <FeedState > get notifier => _stateNotifier;
8484 Stream <FeedState > get stream => _stateNotifier.stream;
8585 late final FeedStateNotifier _stateNotifier;
@@ -357,7 +357,7 @@ class Feed with Disposable {
357357 }) async {
358358 final result = await feedsRepository.updateFeedMembers (query.fid, request);
359359
360- return result.onSuccess (_memberList.notifier .onMembersUpdated);
360+ return result.onSuccess (_memberList.stateNotifier .onMembersUpdated);
361361 }
362362
363363 /// Accepts a feed member invitation.
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class FeedList with Disposable {
4141
4242 late final FeedListStateNotifier _stateNotifier;
4343
44- FeedListState get state => notifier.state ;
44+ FeedListState get state => notifier.value ;
4545 StateNotifier <FeedListState > get notifier => _stateNotifier;
4646 Stream <FeedListState > get stream => _stateNotifier.stream;
4747
You can’t perform that action at this time.
0 commit comments