Make a News Feed App with Flutter
What This App Does
A News Feed app serves a specific need in today's mobile-first world. Building one with Flutter means you ship to iOS, Android, and the web from a single codebase, cutting development time dramatically while keeping a native-quality experience.
Main Features
| Feature | Why It Matters |
|---|---|
| Aggregated Feed | Pull articles from multiple RSS/Atom sources into a unified timeline |
| Category Channels | Pre-defined topic channels (Tech, Sports, Politics) that users follow |
| Bookmarking | Save articles to read later with offline caching |
How to Make a News Feed App with Flutter
Aggregated Feed
class Article {
final String title, link, description, sourceName;
final DateTime pubDate;
final String? imageUrl;
Article({required this.title, required this.link,
required this.description, required this.sourceName,
required this.pubDate, this.imageUrl});
}
class FeedService {
Future> fetchFromRss(String url) async {
final response = await http.get(Uri.parse(url));
final feed = XmlFeed.parse(response.body);
return feed.items!.map((item) => Article(
title: item.title ?? '',
link: item.link ?? '',
description: item.description ?? '',
sourceName: Uri.parse(url).host,
pubDate: item.pubDate ?? DateTime.now(),
imageUrl: item.imageUrl,
)).toList();
}
}
class FeedWidget extends StatelessWidget {
final List articles;
const FeedWidget({super.key, required this.articles});
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: articles.length,
itemBuilder: (ctx, i) {
final a = articles[i];
return Card(
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
child: ListTile(
leading: a.imageUrl != null
? ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Image.network(a.imageUrl!, width: 60, height: 60, fit: BoxFit.cover),
)
: Icon(Icons.article, color: Colors.grey.shade400),
title: Text(a.title, maxLines: 2, overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.w600)),
subtitle: Text('\${a.sourceName} · \${_timeAgo(a.pubDate)}',
style: TextStyle(color: Colors.grey.shade500, fontSize: 12)),
trailing: IconButton(
icon: Icon(Icons.bookmark_border),
onPressed: () => /* save bookmark */,
),
onTap: () => launchUrl(Uri.parse(a.link)),
),
);
},
);
}
String _timeAgo(DateTime dt) {
final diff = DateTime.now().difference(dt);
return diff.inHours < 24 ? '\${diff.inHours}h ago' : '\${diff.inDays}d ago';
}
}
Recommended Libraries
| Package | Purpose |
|---|---|
| webfeed | RSS/Atom feed parsing |
| hive | Offline article caching and bookmarks |
| url_launcher | Open article URLs in browser |
UI & UX Suggestions
Use a clean white theme, red breaking-news badge, blue link colour colour palette to match the app's purpose. Keep the navigation simple — a bottom nav bar or a single-scroll layout works best for this type of app. Make sure every interaction provides haptic or visual feedback so the app feels responsive and polished.