feed-datasource-expert

Build paginated reactive Flutter feeds with FeedDataSource and PagedFeedDataSource.

188|18|Updated Apr 28, 2023
One-click install
npx skills add https://github.com/flutter-it/watch_it --skill feed-datasource-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feed-datasource-expert
Source: https://github.com/flutter-it/watch_it/tree/main/skills/feed-datasource-expert
Command: npx skills add https://github.com/flutter-it/watch_it --skill feed-datasource-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pattern for building paginated, reactive list/feed widgets in Flutter using ValueNotifiers and Commands, including proxy lifecycle management across the feed's life-cycle.

Core Features & Use Cases

  • Base FeedDataSource supports non-paged, finite data handling with safe mutation and item counting.
  • PagedFeedDataSource enables cursor-based pagination, auto-pagination when nearing the end, and separate loading states for initial loads and next pages.
  • Proxy lifecycle integration with a manager to create and release proxies, plus event-bus driven feed updates and easy creation via createOnce.

Quick Start

Create a feed source in the owning widget with createOnce and connect it to a FeedView, then trigger the initial load via updateDataCommand.

Frequently Asked Questions about feed-datasource-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a paginated feed in Flutter with infinite scroll?

To build a paginated feed in Flutter, use PagedFeedDataSource to enable cursor-based pagination and auto-pagination when nearing the end of the list. It separates initial load states from next-page loading to manage infinite scroll efficiently.

How do I update a Flutter feed list reactively using event-bus?

Update a Flutter feed list reactively by driving feed updates through an event-bus. The pattern integrates ValueNotifiers with Commands to handle event-driven data mutations while maintaining safe proxy lifecycles.

How do I manage proxy lifecycle safely in a Flutter feed widget?

Manage proxy lifecycle safely in a Flutter feed widget by using a dedicated proxy manager to create and release proxies. The createOnce method ensures proxies are bound correctly across the feed's life-cycle.

Does this paginated feed pattern support both finite and infinite list handling?

Yes, this paginated feed pattern supports both finite and infinite list handling. Base FeedDataSource manages non-paged finite data with safe mutations, while PagedFeedDataSource handles cursor-based pagination for infinite lists.

What is the best way to separate initial load and next page loading in Flutter?

The best way to separate initial load and next page loading in Flutter is using PagedFeedDataSource. It specifies distinct update and next-page commands, ensuring isolated loading states for initial data fetches versus subsequent pagination.

Why do I need separate commands for updating data and loading the next page?

Separate commands for updating data and loading the next page are needed to prevent state conflicts. This separation isolates initial load operations from pagination triggers, ensuring auto-pagination near the list end behaves safely.