FLUTTER ECOSYSTEM

aagarwal1012/Liquid-Pull-To-Refresh

🔁 플러터용 사용자 정의 새로 고침 표시기.

액체 끌어올리기 새로 고침 프로젝트 이미지
Stars
1.3천
Forks
91
최근 푸시(UTC)
2023. 7. 26.
프로젝트 상태
활성
Ayush Agarwal GitHub avatar
GITHUB User

Ayush Agarwal ↗

Building @dodopayments ✨

@dodopaymentsBengaluru, India공식 웹사이트 ↗
언어DartHTMLObjective-CSwiftJavaKotlin

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기
https://github.com/aagarwal1012/Liquid-Pull-To-Refresh/blob/master/display/cover.png?raw=true

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
https://github.com/aagarwal1012/Liquid-Pull-To-Refresh/blob/master/display/liquid.gif?raw=true https://github.com/aagarwal1012/Liquid-Pull-To-Refresh/blob/master/display/liquid_false.gif?raw=true

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):

https://avatars0.githubusercontent.com/u/18698574?v=4?s=100
opannapo

💻
https://avatars1.githubusercontent.com/u/1090627?v=4?s=100
Anthony Taormina

📖
https://avatars0.githubusercontent.com/u/14993994?v=4?s=100
Erzhan

⚠️
https://avatars1.githubusercontent.com/u/23566790?v=4?s=100
Puttipong Wongrak

🐛
https://avatars2.githubusercontent.com/u/37381075?v=4?s=100
Aayush Malhotra

🐛
https://avatars.githubusercontent.com/u/51935943?v=4?s=100
benja8151

📦 🚧
https://avatars.githubusercontent.com/u/45097990?v=4?s=100
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.