パッケージ、リポジトリ、アプリカテゴリを検索

swipe_refresh のカバー
パッケージ詳細v1.1.2

swipe_refresh

プルダウン操作を使用して更新を行うためのウィジェットのセットです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
4240
いいね数
98
Pub ポイント
150

パッケージをインストール

flutter pub add swipe_refresh

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

SwipeRefresh は、スクロール可能なリストやその他のコンテンツで「下にスワイプして更新」機能を有効にするための Flutter パッケージです。動的なデータ(フィードやリストなど)を持つアプリでよく使われる自然なジェスチャーでコンテンツを更新できるようにすることで、ユーザー体験を向上させます。このパッケージは Android、iOS、Web、macOS、Windows、Linux などの複数のプラットフォームをサポートしており、デバイス間での動作の一貫性を確保します。既存のスクロールビューとシームレスに統合され、カスタマイズ可能なインジケーターとリフレッシュトリガーを提供しています。

用途

  • リストデータを更新する
  • フィードコンテンツの更新
  • プルで新しいアイテムを読み込み中
  • スクロール可能なビューでのUXの向上
  • ダッシュボードでプルトゥリフレッシュを実装する

主な機能

  • プルダウンジェスチャーのサポート
  • カスタマイズ可能なリフレッシュインジケータ
  • クロスプラットフォーム互換性
  • ScrollView との簡単な統合
  • リフレッシュのトリガータイミングをカスタマイズ可能
  • リフレッシュ中のスムーズなアニメーション

適している対象

  • 動的リストを構築する開発者
  • リアルタイムデータ更新を必要とするアプリ
  • ユーザーエクスペリエンスを重視したモバイルおよびWebアプリケーション
  • 複数プラットフォーム間で一貫した更新パターンを必要とするプロジェクト
  • 直感的なユーザー操作を重視するチーム

注意事項

  • 追加の状態管理が必要になる場合があります
  • 重いリフレッシュロジックによるパフォーマンスへの影響
  • 複雑なリフレッシュアニメーションのカスタマイズが限られている
  • スクロールできないコンテンツには適していない
  • スクロール可能なコンテナ内での適切な使用に依存する

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Swipe Refresh

Build Status Coverage Status Pub Version Pub Likes Pub popularity Flutter Platform

Overview

Widget for refresh by swipe.

  • :1234: Enabled on every platform - the package is fully written on Flutter side and enabled on every platform.
  • :recycle: Fully covered by tests - guaranteeing the result and expectations from this package.
  • :notebook_with_decorative_cover: End-to-end documentation - every aspect of implementation is documented, so there is full understanding.
  • :cow2: Support from the best Flutter experts - we are open to any enhancement ideas and contributions.

material cupertino

Main classes:

  1. Refresh state
  2. Widget for indicate swipe refresh
  3. Widget for indicate swipe refresh Material style
  4. Widget for indicate swipe refresh Cupertino style

Example

Material

Refresh indicator widget with Material Design style.

SwipeRefresh.material(
  stateStream: Stream<SwipeRefreshState>(),
  onRefresh: _refresh,
  padding: const EdgeInsets.symmetric(vertical: 10),
  children: <Widget>[ ... ],
);

Future<void> _refresh() async {
  // When all needed is done change state.
  _controller.sink.add(SwipeRefreshState.hidden);
}
Cupertino

Refresh indicator widget with Cupertino Design style.

SwipeRefresh.cupertino(
  stateStream: Stream<SwipeRefreshState>(),
  onRefresh: _refresh,
  padding: const EdgeInsets.symmetric(vertical: 10),
  children: <Widget>[ ... ],
);

Future<void> _refresh() async {
  // When all needed is done change state.
  _controller.sink.add(SwipeRefreshState.hidden);
}
Adaptive

Refresh indicator widget with adaptive to platform style.

SwipeRefresh.adaptive(
  stateStream: Stream<SwipeRefreshState>(),
  onRefresh: _refresh,
  padding: const EdgeInsets.symmetric(vertical: 10),
  children: <Widget>[ ... ],
);

Future<void> _refresh() async {
  // When all needed is done change state.
  _controller.sink.add(SwipeRefreshState.hidden);
}
Builder

Refresh 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).

SwipeRefresh.builder(
  stateStream:  Stream<SwipeRefreshState>(),
  onRefresh: _refresh,
  padding: const EdgeInsets.symmetric(vertical: 10),
  itemCount: Colors.primaries.length,
  itemBuilder: (context, index) {
return Container(
 ...
   );
 },
),

Future<void> _refresh() async {
  // When all needed is done change state.
  _controller.sink.add(SwipeRefreshState.hidden);
}

Installation

Add swipe_refresh to your pubspec.yaml file:

dependencies:
  swipe_refresh: $currentVersion$

At this moment, the current version of swipe_refresh is swipe_refresh version.

Changelog

All notable changes to this project will be documented in this file.

Issues

To report your issues, submit them directly in the Issues section.

Contribute

If 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 first and send us your pull request.

Your PRs are always welcome.

How to reach us

Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.

Telegram

License

Apache License, Version 2.0

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。