refresh_sticky 0.1.2 copy "refresh_sticky: ^0.1.2" to clipboard
refresh_sticky: ^0.1.2 copied to clipboard

A Flutter package for creating a sticky refresh indicator that can be used to refresh the content of a scrollable widget.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:refresh_sticky/refresh_sticky.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Refresh Sticky Example'),
        ),
        body: RefreshSticky(
          reverse: false,
          builder: (context, controller) {
            return ListView.builder(
              reverse: false,
              physics: const AlwaysScrollableScrollPhysics(
                parent: BouncingScrollPhysics(),
              ),
              controller: controller,
              itemCount: 30,
              itemBuilder: (context, index) {
                return ListTile(
                  title: Text('Item $index'),
                );
              },
            );
          },
          onRefresh: () async {
            await Future.delayed(const Duration(seconds: 2));
          },
        ),
      ),
    );
  }
}
2
likes
160
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for creating a sticky refresh indicator that can be used to refresh the content of a scrollable widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on refresh_sticky