

Stream Feed offers a number of different backend-clients, including Dart! Seeing as we are Flutter developers, we will use the Dart client to generate tokens. ❗️ NOTE: This should only be done in a development environment - tokens should never be hardcoded in a production application. However, for demonstration purposes, you will hardcode your users and their tokens in the application. You would normally do this by creating your own custom backend application that can execute various sensitive server operations and keep track of all your users. However, for your client application to communicate with the Stream Feeds API, you will first need authentication tokens to validate your server requests. 🕵️♀️ Step Four - Creating Frontend TokensĬreating, and updating, users in Stream Feeds is simple. Please take note of your application’s Key and Secret, you will need them in the next section. The Secret should be kept private at all times - it is the equivalent of a password. Your Secret helps generate authenticated user tokens and perform sensitive API operations. Your API Key is only an app identifier and safe to share publicly. An example of creating the user feed is shown below. Now, click on the Add Feed Group button, and create a “ user” and “ timeline” flat feed. To learn more about feed groups see the documentation on the different feeds types ( Flat, Aggregated, Notification). ❓ Note: You can name these feeds anything you want, but user and timeline are two standard names, and you will be referencing these names later in your code. In summary, if you sign in to the Stream-agram application, the user feed will show all of your posts, and the timeline feed will show all the user feeds that you have subscribed to. The timeline flat feed will be used to subscribe to other users, and our own, user feeds. The user flat feed will be the feed that users post their pictures to. Flat feeds can also be used to consume activities from other feeds - in a "timeline"-like manner.Įach user in your Instagram application will have their own unique feeds. To give your Instagram clone the same feeds interactivity you experience when using the app, you will create two Flat Feeds:įlat feeds are the only feeds that can be followed, and therefore are a good type to set up for adding activities. Step Three - Create User and Timeline Instagram Feeds With some of the higher-level concepts out of the way, we can finally start. They should also be able to see all of the posts that they’ve made. Users should be allowed to follow specific users they are interested in and see a timeline of posts from all those they follow. These posts should also show user engagement and reactions in the form of likes and comments.

You will make a feed of user-generated picture posts (activities). Let’s discuss how an activity feed will work in the context of building your Instagram clone. Stream takes the complexity of managing these activity feeds and makes it simple, and the Stream Feed Flutter SDK makes it simple from a front-end perspective. Activity feeds display information from a user’s online community such as likes, follows, comments, posts, and content shares. Sometimes called a newsfeed or activity stream, an activity feed is a real-time list of actions performed by users on an app or website. To understand what Stream’s Flutter Feed SDK offers you, you first need to understand what an activity feed is. Using AutomaticKeepAliveClientMixin to cache pages.Using TextEditingController, PageController and FocusNode.A lot of Flutter layout and other tips.
#Applications like filechute how to#
