astro_refresh_indicator 1.0.1 copy "astro_refresh_indicator: ^1.0.1" to clipboard
astro_refresh_indicator: ^1.0.1 copied to clipboard

outdated

A Flutter package that implements a RefreshIndicator. This package is meant to be used along with pull_to_refresh package.

Astro Refresh Indicator #

pub package License: MIT style: very good analysis

A Flutter package that implements a RefreshIndicator. This package is meant to be used along with pull_to_refresh package.

Installation #

Add the following lines to the pubspec.yaml:

dependencies:
  astro_refresh_indicator: ^1.0.0
  pull_to_refresh: ^2.0.0

Example #

  final RefreshController _refreshController = RefreshController();

  Future<void> _onRefresh() async {
    await Future<void>.delayed(const Duration(milliseconds: 3000));

    _refreshController.refreshCompleted();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: RefreshConfiguration(
        // should be greater than AstroRefreshIndicator height
        headerTriggerDistance: 155,
        child: SmartRefresher(
          header: const AstroRefreshIndicator(),
          controller: _refreshController,
          onRefresh: _onRefresh,
          child: ListView.builder(
            padding: const EdgeInsets.symmetric(vertical: 5),
            itemBuilder: (c, i) => const Card(),
            itemExtent: 200,
            itemCount: 5,
          ),
        ),
      ),
    );
  }

  @override
  void dispose() {
    _refreshController.dispose();
    super.dispose();
  }

Credits #

Packages used:

Animation:

License #

Licensed under the MIT License.

8
likes
0
pub points
52%
popularity

Publisher

unverified uploader

A Flutter package that implements a RefreshIndicator. This package is meant to be used along with pull_to_refresh package.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

flutter, pull_to_refresh, rive

More

Packages that depend on astro_refresh_indicator