Skip to main content

flutter_refresh_indicator 1.4.0 copy "flutter_refresh_indicator: ^1.4.0" to clipboard
flutter_refresh_indicator: ^1.4.0 copied to clipboard

This package provides a refresh indicator widget that is far more flexible and native-like than the default Flutter one, built on top of flutter_nested_scroll.

example/main.dart

import 'package:flutter/material.dart' hide RefreshIndicator;
import 'package:flutter_refresh_indicator/flutter_refresh_indicator.dart';

void main() {
  runApp(MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Example(),
        ),
      ),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return RefreshIndicator(
      onRefresh: () => .delayed(Duration(seconds: 1)),
      child: ListView.builder(
        itemCount: 100,
        itemBuilder: (context, index) {
          return Container(
            height: 50,
            color: index % 2 == 0 ? Colors.red : Colors.blue,
          );
        },
      ),
    );
  }
}
7
likes
160
points
457
downloads

Documentation

API reference

Publisher

verified publisherttangkong.dev

Weekly Downloads

This package provides a refresh indicator widget that is far more flexible and native-like than the default Flutter one, built on top of flutter_nested_scroll.

Repository (GitHub)
View/report issues

Topics

#refresh #refresh-indicator #pull-to-refresh

License

MIT (license)

Dependencies

flutter, flutter_nested_scroll

More

Packages that depend on flutter_refresh_indicator