LiquidPullToRefresh는 부드러운 애니메이션과 유연한 전환 효과를 통해 표준 하단으로 당기기 리프레시 기능을 향상시키는 시각적으로 매력적인 Flutter 패키지입니다. 사용자 제스처에 따라 동적으로 반응하는 현대적이고 액체 같은 리프레시 인디케이터를 제공하여 모든 플랫폼에서 몰입감 있는 사용자 경험을 제공합니다. 최소한의 설정으로 정교하고 상호작용 가능한 리프레시 메커니즘을 원하는 앱에 이상적입니다. 이 패키지는 Android, iOS, Web, macOS, Windows 및 Linux를 지원하여 매우 유연합니다. 사용자 정의 가능한 디자인은 개발자가 앱의 미적 스타일에 맞게 외관과 행동을 조정할 수 있게 해줍니다.
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.
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.