How to Start Feed with Specific Post IDs
Introduction
Starting the feed from a specific post improves content discovery, especially when users land via shared links or post thumbnails. This guide shows how to use the LikeMinds Feed Flutter SDK to launch a feed that begins from a defined list of post IDs—ideal for video feed experiences.
Prerequisites
Before you begin, ensure the following:
- LikeMinds Feed Flutter SDK: The SDK must be properly installed and initialized in your Flutter project. Refer to the installation guide if needed.
- Basic Understanding of Flutter: Familiarity with Flutter widgets and navigation principles.
- Post ID(s): You must have the specific post IDs you want to start the feed with.
Steps
Step 1: Create route to Feed Screen
Use the LMFeedVideoFeedScreen
widget and pass the post IDs using the startFeedWithPostIds
parameter. This defines the post(s) from which the feed will start.
LMFeedSocialScreen
and LMFeedQnAScreen
also support the startFeedWithPostIds
parameter, allowing you to customize the starting point of the feed for different feed theme.
// Create a material route for feed screen
MaterialPageRoute route = MaterialPageRoute(
builder: (context) => LMFeedVideoFeedScreen(
// Pass specific post IDs to start feed with
startFeedWithPostIds: ['POST_ID_1', 'POST_ID_2'],
),
);
Step 2: Navigate to Feed Screen with Post IDs
// Navigate to that page
Navigator.push(context, route);
You can pass one or multiple post IDs depending on your requirement. The feed will start from the first post in the list and flow naturally afterward.