搜尋套件、儲存庫與 APP 分類

liquid_pull_to_refresh 封面
套件詳情v3.0.1

liquid_pull_to_refresh

一個美觀且可自訂的刷新指示器,帶有酷炫的動畫和過渡效果,適用於 Flutter。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2.6萬
喜歡數
826
Pub 分數
150

安裝套件

flutter pub add liquid_pull_to_refresh

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

LiquidPullToRefresh 是一個視覺上吸引人的 Flutter 套件,透過流暢的動畫和順滑的過渡效果增強了標準的下拉刷新功能。它提供了一個現代化的液態式刷新指示器,能動態回應使用者手勢,在所有平台提供引人入勝的使用者體驗。適合尋求精緻、互動式刷新機制且設定簡單的應用程式。此套件支援 Android、iOS、Web、macOS、Windows 及 Linux,具有高度的多功能性。其可自訂設計讓開發者能根據應用程式的美學風格調整外觀與行為。

適用情境

  • 透過動畫刷新指示器增強清單檢視
  • 在移動應用和網頁應用中創造沉浸式使用者體驗
  • 向數據加載狀態添加動態反饋
  • 在內容密集型應用中提升使用者介面的精緻度
  • 實現帶有視覺效果的基於手勢的互動

主要特色

  • 流暢的液態動畫效果
  • 可自定義的刷新指示器外觀
  • 跨平台相容性
  • 與 ListView 及其他可滾動組件輕鬆整合
  • 支援下拉刷新和手動刷新觸發
  • 可設定的動畫持續時間和緩動

適合對象

  • 尋求現代 UI 增強功能的開發人員
  • 頻繁更新資料的應用
  • 注重設計的 Flutter 項目
  • 互動式列表或資訊流介面
  • 注重用戶參與和反饋的團隊

使用建議

  • 由於動畫效果,可能會影響低階設備的效能
  • 需要仔細調整動畫參數以獲得最佳使用者體驗
  • 與完全自訂解決方案相比,客製化選項較少
  • 不太適合簡單、極簡的刷新需求
  • 與其他滾動物理效果或自定義指示器的潛在衝突

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Liquid Pull To Refresh

A beautiful and custom refresh indicator for flutter highly inspired from Ramotion Pull Down to Refresh. Try out our live example app.



Table of contents

Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  liquid_pull_to_refresh: ^3.0.1
2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get
3. Import it

Now in your Dart code, you can use:

import 'package:liquid_pull_to_refresh/liquid_pull_to_refresh.dart';

Usage

For adding this custom refresh indicator in your flutter app, you have to simply wrap ListView or GridView inside LiquidPullToRefresh. Also you have provide the value of onRefresh parameter which is a refresh callback.

Note - LiquidPullToRefresh can only be used with a vertical scroll view.

For example:

LiquidPullToRefresh(
        key: _refreshIndicatorKey,	// key if you want to add
        onRefresh: _handleRefresh,	// refresh callback
        child: ListView(),		// scroll view
      );

If you do not want the opacity transition of child then set showChildOpacityTransition: false. Preview regarding the both form of this widget is follows :-

showChildOpacityTransition: true showChildOpacityTransition: false

Documentation

LiquidPullToRefresh Class
Dart attribute Datatype Description Default Value
child ScrollView The widget below this widget in the tree. @required
onRefresh RefreshCallback A function that's called when the refreshing of page takes place. @required
height double The distance from the child's top or bottom edge to where the box will settle after the spring effect. 100.0
springAnimationDurationInMilliseconds int Duration in milliseconds of springy effect that occurs when we leave dragging after full drag. 1000
borderWidth double Border width of progressing circle in Progressing Indicator. 2.0
showChildOpacityTransition bool Whether to show child opacity transition or not. true
color Color The progress indicator's foreground color. ColorScheme.secondary
backgroundColor Color The progress indicator's background color. ThemeData.canvasColor
animSpeedFactor double Controls the speed of the animation after refresh. Used to fasten the ending animation. 1.0

For help on editing package code, view the flutter documentation.

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.

See Contributing.md.

Donate

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:

Contributors

Thanks goes to these wonderful people (emoji key):


opannapo

💻

Anthony Taormina

📖

Erzhan

⚠️

Puttipong Wongrak

🐛

Aayush Malhotra

🐛

benja8151

📦 🚧

Remco Schrijver

📦 🚧

This project follows the all-contributors specification. Contributions of any kind welcome! See Contributing.md.

License

Liquid-Pull-To-Refresh is licensed under MIT license. View license.

所屬分類

原始碼儲存庫

使用此套件的專案