Skip to content

Conversation

@renefloor
Copy link
Collaborator

@renefloor renefloor commented Jul 31, 2025

Submit a pull request

Closes FLU-218
Closes FLU-219

related: GetStream/stream-core-flutter#3

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

This is a big PR which adds a lot of boilerplate logic.

Sample app:

  1. Sample app uses AutoRoute for navigation and has a guard for authentication.
  2. For now the authentication (user_id) is stored in shared preferences and loaded on startup.
  3. Sample app shows basic user feed when user is logged in.

Feeds SDK:
Feeds SDK is heavily inspired by the iOS SDK.

We have the FeedsClient that everybody has to use, it's connected to a userId and you have to call client.connect() to connect the websocket.

With client.feed(query) you create a feed object. By doing feed.getOrCreate() it will do an API call and you can start listening to updates.
The feed.stateNotifier is responsible for updating the state of the feed, for example using the websocket.
The FeedWsHandler is the one actually listening to websocket events and calling the stateNotifier to update when needed.
The stateNotifier.onReactionAdded and other similar methods can be used directly as well based on user interaction. Similar to the changeHandler on iOS.

Mapping between data and domain objects is done in the mappers file. Updating domain objects (using copyWith and immutable lists) is mostly done in the model classes directly.

To run this you'll need to have a local copy of the core sdk with code from this PR: GetStream/stream-core-flutter#3

Screenshots / Videos

flutter.feeds.demo.mov

@renefloor renefloor requested a review from a team as a code owner July 31, 2025 11:46
@renefloor renefloor force-pushed the feature/show-activity-list branch from d3bd23e to cba38f2 Compare July 31, 2025 13:02
@renefloor renefloor force-pushed the feature/show-activity-list branch from 75ec9e8 to 5fb4e14 Compare August 5, 2025 08:54
@renefloor renefloor merged commit 5164312 into main Aug 5, 2025
1 of 6 checks passed
@xsahil03x xsahil03x deleted the feature/show-activity-list branch September 1, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants