social_media_list
A highly customizable Flutter package for displaying a social media feed with pagination, detail views, media playback, and social sharing capabilities.
Features
- Infinite Scrolling Feed: Easily build paginated lists of social media posts.
- Detail View: Seamlessly transitions into a detailed view for posts, with full HTML content support.
- Media Playback: Built-in support for displaying images and playing inline videos using
chewieandvideo_player. - Social Sharing: Out-of-the-box integration with
share_plusto easily share content across multiple platforms (Instagram, LinkedIn, TikTok, X). - Theming & Localization: Completely customizable styling via
SocialMediaThemeand localization support viaAppLocalizationController. - Shimmer Loading Effects: Beautiful default skeleton loading screens.
Getting started
In your pubspec.yaml file add:
dependencies:
social_media_list: ^0.0.1
Then run flutter pub get.
Usage
First, initialize the module in your main.dart or before rendering the screens.
import 'package:social_media_list/social_media_list.dart';
void main() {
SocialMediaModule.initialize(
config: SocialMediaConfig(
fetchList: (page, perPage) async {
// Return your API data here
},
fetchDetail: (id) async {
// Return detailed data here
},
theme: SocialMediaTheme(
// Customize your theme completely
appBarTitleText: 'My Feed',
),
),
);
runApp(MyApp());
}
Then, you can display the social media screen anywhere in your app:
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: const SocialMediaScreen(),
);
}
}
Customization
The package is designed to be fully customizable. You can override colors, padding, text styles, and even provide completely custom builder functions for the list items using SocialMediaTheme.
Additional information
For more information, file issues or contribute, visit the GitHub repository.