Skip to content

Theming & Visual Styles

smart_refresher comes with 5 distinct visual styles (themes) out of the box, all of which respect your Flutter ThemeData and can be customized via the SmartRefresherTheme API.

These are the 5 primary indicator styles you can use:

The default style. It uses a simple arrow and text on mobile, adapting its spinner to CircularProgressIndicator on Android and CupertinoActivityIndicator on iOS.

header: ClassicHeader()

Follows the latest Material Design 3 guidelines with a floating circular card and refined animations. It pulls primary colors directly from your ThemeData.colorScheme.surface.

header: Material3Header()

A pixel-perfect recreation of the native iOS 17 refresh indicator with 12-spoke geometry and authentic haptic feedback.

header: iOS17Header()

For a more “liquid” feel, the Bezier and WaterDrop indicators use canvas animations to create a stretching effect as you pull.

header: WaterDropHeader() // or BezierHeader()

A premium blurred indicator style that blends with the content behind it, perfect for modern, editorial-style apps.

header: GlassHeader()

Instead of configuring every SmartRefresher manually, you can set app-wide defaults using SmartRefresherThemeData.

Add SmartRefresherThemeData to your ThemeData.extensions in your MaterialApp:

MaterialApp(
theme: ThemeData(
useMaterial3: true,
extensions: [
SmartRefresherThemeData(
primaryColor: Colors.deepPurple,
accentColor: Colors.amber,
material3Elevation: 8.0,
iosTickColor: Colors.grey,
),
],
),
)

You can override the theme for a specific part of your app by wrapping it in a SmartRefresherTheme widget:

SmartRefresherTheme(
data: SmartRefresherThemeData(
primaryColor: Colors.red,
),
child: MyRefreshableList(),
)

All themes handle 4 distinct visual states automatically:

  1. Idle: Waiting for pull.
  2. Pulling: User is dragging; indicators often show progress or “release to refresh” hints.
  3. Refreshing/Loading: The active state where your backend logic runs.
  4. Success/Failed: Brief visual feedback before the indicator slides away.