riverpod-pull-to-refresh

Adds pull-to-refresh to Flutter apps using a Reactor-based provider and AsyncValue.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/masssi164/weave --skill riverpod-pull-to-refresh-masssi164
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: riverpod-pull-to-refresh
Source: https://github.com/masssi164/weave/tree/main/.agent/skills/riverpod-pull-to-refresh
Command: npx skills add https://github.com/masssi164/weave --skill riverpod-pull-to-refresh-masssi164

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Riverpod-based Flutter apps often struggle to implement robust pull-to-refresh UX that preserves data while refreshing, shows loading indicators, and handles errors cleanly.

Core Features & Use Cases

  • Refresh integration: Wrap your scrollable content in RefreshIndicator and trigger ref.refresh on user pull to refresh the underlying data.
  • AsyncValue handling: Render loading, data, and error states using the AsyncValue pattern to preserve previous data during refresh.
  • Initial and refresh UX: Show a full-screen loader on initial load and keep displaying previous data during a refresh until new data arrives.

Quick Start

Wrap your ListView in a RefreshIndicator and trigger ref.refresh on pull.

Frequently Asked Questions about riverpod-pull-to-refresh

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

FAQPage Schema
How do I implement pull-to-refresh in Flutter using Riverpod?

To implement pull-to-refresh in Flutter with Riverpod, wrap your scrollable content in a RefreshIndicator and trigger ref.refresh on the provider to fetch new data upon user pull.

How does AsyncValue handle loading and error states during a Riverpod refresh?

AsyncValue pattern matching preserves previous data during an ongoing refresh and cleanly renders loading, data, or error states, allowing you to show a full-screen loader initially and keep old data visible until new data arrives.

Can I use RefreshIndicator with Riverpod providers to manage asynchronous data fetching?

Yes, you can use RefreshIndicator with Riverpod providers by wrapping a scrollable widget and calling a provider that exposes a refresh method to coordinate asynchronous data fetching.

What's the best way to show a full-screen loader on initial load while keeping data during a refresh in Flutter?

The best way to differentiate initial loading from ongoing refreshes in Flutter is using AsyncValue pattern matching to render a full-screen loader initially while preserving previous data during a pull-to-refresh action.

Why does my Riverpod pull-to-refresh clear existing data before the new data loads?

If your Riverpod pull-to-refresh clears existing data, you likely are not using AsyncValue pattern matching correctly to preserve previous data during the refresh cycle until new data arrives.

Do I need a specific Riverpod provider type to enable pull-to-refresh functionality?

You need a Riverpod provider that exposes a refresh method and supports asynchronous data fetching to coordinate with the RefreshIndicator widget for pull-to-refresh functionality.