{"id":21748304,"url":"https://github.com/surfstudio/flutter-swipe-refresh","last_synced_at":"2025-04-13T07:13:16.732Z","repository":{"id":40369503,"uuid":"384333986","full_name":"surfstudio/flutter-swipe-refresh","owner":"surfstudio","description":"Made by Surf 🏄","archived":false,"fork":false,"pushed_at":"2024-04-18T15:02:39.000Z","size":359,"stargazers_count":12,"open_issues_count":2,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-13T07:13:09.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/surfstudio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-07-09T05:44:10.000Z","updated_at":"2024-05-25T15:40:19.000Z","dependencies_parsed_at":"2024-02-13T21:23:22.753Z","dependency_job_id":"533b5790-9d55-4294-81c8-6e660cbdf615","html_url":"https://github.com/surfstudio/flutter-swipe-refresh","commit_stats":{"total_commits":50,"total_committers":7,"mean_commits":7.142857142857143,"dds":0.54,"last_synced_commit":"514dd46d6cfd88589fe11b19c6633f010db3f7ab"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surfstudio%2Fflutter-swipe-refresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surfstudio%2Fflutter-swipe-refresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surfstudio%2Fflutter-swipe-refresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surfstudio%2Fflutter-swipe-refresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surfstudio","download_url":"https://codeload.github.com/surfstudio/flutter-swipe-refresh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675422,"owners_count":21143768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T08:12:58.966Z","updated_at":"2025-04-13T07:13:16.672Z","avatar_url":"https://github.com/surfstudio.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swipe Refresh\n\n\u003cimg src=\"https://raw.githubusercontent.com/surfstudio/flutter-open-source/main/assets/logo_black.png#gh-light-mode-only\" width=\"200\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/surfstudio/flutter-open-source/main/assets/logo_white.png#gh-dark-mode-only\" width=\"200\"\u003e\n\n[![Build Status](https://shields.io/github/actions/workflow/status/surfstudio/flutter-swipe-refresh/on_pull_request.yml?logo=github\u0026logoColor=white)](https://github.com/surfstudio/flutter-swipe-refresh)\n[![Coverage Status](https://img.shields.io/codecov/c/github/surfstudio/flutter-swipe-refresh?logo=codecov\u0026logoColor=white)](https://app.codecov.io/gh/surfstudio/flutter-swipe-refresh)\n[![Pub Version](https://img.shields.io/pub/v/swipe_refresh?logo=dart\u0026logoColor=white)](https://pub.dev/packages/swipe_refresh)\n[![Pub Likes](https://badgen.net/pub/likes/swipe_refresh)](https://pub.dev/packages/swipe_refresh)\n[![Pub popularity](https://badgen.net/pub/popularity/swipe_refresh)](https://pub.dev/packages/swipe_refresh/score)\n![Flutter Platform](https://badgen.net/pub/flutter-platform/swipe_refresh)\n\n## Overview\n\nWidget for refresh by swipe.\n\n- :1234: Enabled on every platform - the package is fully written on Flutter side and enabled on every platform.\n- :recycle: Fully covered by tests - guaranteeing the result and expectations from this package.\n- :notebook_with_decorative_cover: End-to-end documentation - every aspect of implementation is documented, so there is full understanding.\n- :cow2: Support from the best Flutter experts - we are open to any enhancement ideas and contributions.\n\n![material](https://i.ibb.co/7Kmy91f/material.gif)\n![cupertino](https://i.ibb.co/smPxRp7/cupertino.gif)\n\nMain classes:\n\n1. [Refresh state](lib/src/swipe_refresh_state.dart)\n2. [Widget for indicate swipe refresh](lib/src/swipe_refresh.dart)\n3. [Widget for indicate swipe refresh Material style](lib/src/material_swipe_refresh.dart)\n4. [Widget for indicate swipe refresh Cupertino style](lib/src/cupertino_swipe_refresh.dart)\n\n## Example\n\n### Material\n\nRefresh indicator widget with Material Design style.\n\n```dart\nSwipeRefresh.material(\n  stateStream: Stream\u003cSwipeRefreshState\u003e(),\n  onRefresh: _refresh,\n  padding: const EdgeInsets.symmetric(vertical: 10),\n  children: \u003cWidget\u003e[ ... ],\n);\n\nFuture\u003cvoid\u003e _refresh() async {\n  // When all needed is done change state.\n  _controller.sink.add(SwipeRefreshState.hidden);\n}\n```\n\n### Cupertino\n\nRefresh indicator widget with Cupertino Design style.\n\n```dart\nSwipeRefresh.cupertino(\n  stateStream: Stream\u003cSwipeRefreshState\u003e(),\n  onRefresh: _refresh,\n  padding: const EdgeInsets.symmetric(vertical: 10),\n  children: \u003cWidget\u003e[ ... ],\n);\n\nFuture\u003cvoid\u003e _refresh() async {\n  // When all needed is done change state.\n  _controller.sink.add(SwipeRefreshState.hidden);\n}\n```\n\n### Adaptive\n\nRefresh indicator widget with adaptive to platform style.\n\n```dart\nSwipeRefresh.adaptive(\n  stateStream: Stream\u003cSwipeRefreshState\u003e(),\n  onRefresh: _refresh,\n  padding: const EdgeInsets.symmetric(vertical: 10),\n  children: \u003cWidget\u003e[ ... ],\n);\n\nFuture\u003cvoid\u003e _refresh() async {\n  // When all needed is done change state.\n  _controller.sink.add(SwipeRefreshState.hidden);\n}\n```\n\n### Builder\n\nRefresh indicator widget with adaptive to platform style, and with SliverChildBuilderDelegate in childDelegate(so as not to create more child elements than are visible through Viewport).\n\n```dart\nSwipeRefresh.builder(\n  stateStream:  Stream\u003cSwipeRefreshState\u003e(),\n  onRefresh: _refresh,\n  padding: const EdgeInsets.symmetric(vertical: 10),\n  itemCount: Colors.primaries.length,\n  itemBuilder: (context, index) {\nreturn Container(\n ...\n   );\n },\n),\n\nFuture\u003cvoid\u003e _refresh() async {\n  // When all needed is done change state.\n  _controller.sink.add(SwipeRefreshState.hidden);\n}\n```\n\n## Installation\n\nAdd `swipe_refresh` to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  swipe_refresh: $currentVersion$\n```\n\n\u003cp\u003eAt this moment, the current version of \u003ccode\u003eswipe_refresh\u003c/code\u003e is \u003ca href=\"https://pub.dev/packages/swipe_refresh\"\u003e\u003cimg style=\"vertical-align:middle;\" src=\"https://img.shields.io/pub/v/swipe_refresh.svg\" alt=\"swipe_refresh version\"\u003e\u003c/a\u003e.\u003c/p\u003e\n\n## Changelog\n\nAll notable changes to this project will be documented in [this file](./CHANGELOG.md).\n\n## Issues\n\nTo report your issues, submit them directly in the [Issues](https://github.com/surfstudio/flutter-swipe-refresh/issues) section.\n\n## Contribute\n\nIf you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our [contribution guide](./CONTRIBUTING.md) first and send us your pull request.\n\nYour PRs are always welcome.\n\n## How to reach us\n\nPlease feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.\n\n[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-blue.svg)](https://t.me/SurfGear)\n\n## License\n\n[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurfstudio%2Fflutter-swipe-refresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurfstudio%2Fflutter-swipe-refresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurfstudio%2Fflutter-swipe-refresh/lists"}