custom_refresh_indicator
4.0.2, released 3 months ago by klyta.it
Widget that makes it easy to implement a custom pull to refresh gesture.
What it does
Provides a CustomRefreshIndicator and CustomMaterialIndicator widget to build completely custom pull-to-refresh gestures and animations for scrollable widgets. It manages states like idle, dragging, armed, and loading, letting developers design unique pull-to-refresh experiences.
AI-written summary of version 4.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to build a custom pull-to-refresh animation or UI design.
- You need a pull-to-refresh gesture on horizontal lists or from both edges.
Skip it when
- You only need the standard Material or Cupertino refresh indicator without modifications.
Strengths
- Extremely flexible custom indicator builder with full state tracking.
- Supports both leading and trailing edges, plus horizontal lists.
Weaknesses
- Requires manual implementation for custom animations and transforms.
- Custom indicators must be built from scratch.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
CustomMaterialIndicator(
onRefresh: onRefresh,
backgroundColor: Colors.white,
indicatorBuilder: (context, controller) {
return Padding(
padding: const EdgeInsets.all(6.0),
child: CircularProgressIndicator(
color: Colors.redAccent,
value: controller.state.isLoading ? null : math.min(controller.value, 1.0),
),
);
},
child: child,
)Alternatives
Packages that do the same job and could replace custom_refresh_indicator.
- pull_to_refresh_new
A refresh indicator widget that supports android, ios, and web.
41Compare - easy_refresh
A Flutter widget providing pull-down refresh and pull-up load for all scrollable widgets.
80Compare - flutter_smart_dialog
An elegant Flutter dialog, toast, and loading solution without needing BuildContext.
91Compare - swipe_refresh
Widgets providing pull-down refresh capability with Material and Cupertino styles.
50Compare