Comments (12)
Hey folks, what was the reason it's disabled in flutter 3?
from flutter-custom-refresh-indicator.
It is no longer working in Flutter 3
from flutter-custom-refresh-indicator.
This commit is the problem! (Feb 18, 2022)
"Show RefreshIndicator on top when scroll's axis direction is up (matching native behaviour) (#93779)"
flutter/flutter@14a406f
I'm using the code from the previous commit (Jan 28, 2022):
flutter/flutter@120d25f?diff=unified
from flutter-custom-refresh-indicator.
I haven't tested this yet but it sounds fantastic! Thanks @gonuit! π
from flutter-custom-refresh-indicator.
Hi @aednlaxer,
It is possible to enable the bottom pull to refresh indicator. All you need to do is set the reverse
argument on your scrollable widget like for example: ListView
to true
. Let me know if this is what you were looking for.
from flutter-custom-refresh-indicator.
I didn't know about the reverse
argument, thanks. Although I'm looking for a bit different thing here. I have a ListView
and I'd like to perform two different actions (and have two different indicators) when pulling down from the top and when pulling up from the bottom. Does library support this kind of behavior?
from flutter-custom-refresh-indicator.
So you basically preparing to implement the lazy loading list view right?
from flutter-custom-refresh-indicator.
Hi @aednlaxer ππ» ,
I close this issue as there is no more information. Feel free to reopen it if there is still a need for some action.
from flutter-custom-refresh-indicator.
I'm on it π΅π»
from flutter-custom-refresh-indicator.
Hi @gustavomaedo,
What is the exact issue you are getting? I tested it on the latest version of Flutter (3.3.2) and it works fine for me. π€
Maybe you are able to provide me a GIF/video, stack trace, or just give me more details about it π
from flutter-custom-refresh-indicator.
Oh, I see that this is not recognized correctly for the built-in RefreshIndicator
widget, but the CustomRefreshIndicator
widget provided by this package, still works. Is that correct?
If so, this issue is not related to this package code.
from flutter-custom-refresh-indicator.
Ok, there is an update from my side π₯³
I am working on version 2.0.0
, and a lot of things still need to be done before a stable release BUT! The release 2.0.0-dev.1
is already available on the pub.dev.
It will bring many small fixes and improvements.
The feature you asked for @aednlaxer is now implemented. From version 2.0.0, you will be able to select the bottom, top, or even both edges that will trigger the pull to refresh mechanism.
CustomRefreshIndicator(
edge: IndicatorTriggerEdge.bothEdges, // that will do the trick. Defaults to IndicatorTriggerEdge.start
onRefresh: onRefresh,
builder: customIndicatorBuilder,
child: ListView(children: [/***/]),
);
In addition, from the controller, you will be able to read which edge triggered the pull to refresh action
if (controller.edge == IndicatorEdge.leading) {
print("action triggered from the start of the list");
} else if(controller.edge == IndicatorEdge.trailing) {
print("action triggered from the end of the list");
}
and even on which side of the list the indicator should appear. It takes scroll direction (reversed lists), axis (horizontal/vertical) and edge (especially useful when the edge argument is set to IndicatorTriggerEdge.both, as the action can then be triggered from both edges).
if (controller.side == IndicatorSide.top) { // for vertical lists
print("Display the indicator widget at the top of the list");
} else if (controller.side == IndicatorSide.bottom) { // for vertical lists
print("Display the indicator widget at the bottom of the list");
} else if (controller.side == IndicatorSide.left) { // for horizontal lists
print("Display the indicator widget on the left side of the list");
} else if (controller.side == IndicatorSide.right) { // for horizontal lists
print("Display the indicator widget on the right side of the list");
}
It is also worth noting that, unlike the built-in RefreshIndicator
widget, this package supports horizontal lists and a reverse list parameter.
This API is still in WIP status so it may change, but you can already taste it if you want.
from flutter-custom-refresh-indicator.
Related Issues (20)
- app build fails with version >=1.0.0 - The method 'disallowIndicator' isn't defined for the class 'OverscrollIndicatorNotification' HOT 1
- How to create a simple CupertinoActivityIndicator based loader HOT 1
- Indicator always spinning HOT 3
- Refresh not showing when list has few items. HOT 2
- controller.value is always 0.0 HOT 1
- minimum duration setting HOT 1
- how can i support ListView reverse to load More data. look like IM appοΌ HOT 1
- Is it possible to trigger refresh programmatically? HOT 1
- Rename 'builder' Property to 'indicatorBuilder' for Clarity HOT 1
- Animate the indicator during pull HOT 1
- TabBar Put in TabBarView children: Not displayedοΌ HOT 1
- Untestable HOT 3
- isnt offsetToArmed bugged? it seems to me that the controller.value is only 1 when i scrolled 100% past the offsetToArmed height HOT 2
- Question about the cancelling state - indicator container immediately closes on cancel HOT 4
- CircularProgressIndicator with transparent background HOT 2
- Bug when change scroll direction HOT 1
- IndicatorState may need an 'error' state.
- The listView is not displayed HOT 1
- How can I move the children list down along with the RefreshIndicator?
- [Question] Default indicator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-custom-refresh-indicator.