Comments (15)
Amazing! Thanks both. I added your version to my pubspec.yaml
, and change from Slidable
to Slidable.builder
. Then wrapped the child of Slidable.builder
inside a builder like:
child: new Builder(builder: (contextNew) => new Column(....)
And it perfectly animates the slide-effect for my secondaryactions during onTap
.
However, somehow I need to slide it the first time to make it "recognize" the object, THEN a onTap will slide it out. But If I entered the page and directly press it: Nothing happens... Any clue?
Thanks a lot.
from flutter_slidable.
How to check if the Slidable
Item is opened or closed?
from flutter_slidable.
If Slidable.of(context)
was null, it's maybe because the context is a parent of the Slidable. It can be related to
https://stackoverflow.com/questions/51304568/scaffold-of-called-with-a-context-that-does-not-contain-a-scaffold/51304732
Thank you, I will keep you posted on my advancement 🙂 .
from flutter_slidable.
@miDeb Yes, I did not add the actionType. By adding it as: Slidable.of(context).open(actionType: SlideActionType.secondary)
;
It works every time! Thanks, this is perfect
from flutter_slidable.
@DARdk are you calling open() without the actionType?
from flutter_slidable.
How can I check if the slideable is already open to close it?
from flutter_slidable.
I see. This widget wasn't created with this kind of feature in mind. I need to rewrote some parts in order to be animated by sliding or with a call to a function.
For the moment, you can call Slidable.of(context)
inside the child of a Slidable to get its state and call open(). But you won't get any animation and you won't be able to tell whether you want to open the primary or secondary actions.
I won't be able to do it now, but give me some time and I will do it 🙂.
from flutter_slidable.
Thank you for the prompt answer letsar.
I did not have any luck with your suggestion (my child of Slidable
is a ListTile
). The Slidable.of(context)
was null in all cases.
However, I will just implement a in-app guidance, and keep this functionality as a future feature. Thank you for considering this enhancement in a future version.
from flutter_slidable.
I've implemented a solution for this on my fork, so if you could have a look...
Note that I've also made some other changes.
Perhaps I've broken something😁.
from flutter_slidable.
Great. I've been working on a complete refactor of the API (you can see the work in progress in the https://github.com/letsar/flutter_slidable/tree/feature/refactor branch) and I added the feature to animate on when opening. I will keep you posted on the advancement.
from flutter_slidable.
@DARdk thanks so much, you save me!
from flutter_slidable.
Closing as this is resolved
from flutter_slidable.
@armandojimenez any solution?
from flutter_slidable.
I use this:
if (Slidable.of(context)!.renderingMode == SlidableRenderingMode.none) {
Slidable.of(context)!.open(actionType: SlideActionType.secondary);
} else {
Slidable.of(context)!.close();
}
When I tap the cell, it opens or close depending if it's already open. Do only weird issue, is that if I open it via a tap, and them try to close it by sliding, it does without animation, and looks weird. But if you closed it back by tap it works fine.
from flutter_slidable.
@armandojimenez what should instead of rendering mode in latest null satety version 1.0.0. I want to open the slider at a time on tapping the list item , when i tap on second item , first item just closes its slide but second item not opening it slide
from flutter_slidable.
Related Issues (20)
- The icon of SlidableAction will not be displayed in the center when padding is not set
- Style problem HOT 2
- How do I add a remove animation?
- How to open panes when creating widgets in Flutter slideable package
- When SlidableAction slides to the left to open, close the current page.
- Slidable open Not effective ?
- Doesn't work inside a PageView HOT 1
- how to dismiss slidableAction when using other widget HOT 1
- Want notification when automatically turning off sideslip
- Selection of text inside `TextField` triggers slidable
- how to open slidable in InitState HOT 1
- How to define custom height? HOT 2
- Edit label style and icons size
- Secondary deletion
- How to set the slider extent? HOT 1
- Subsequent row is open after Slidable row is dismissed.
- Focus on flutter web HOT 1
- Query: Smooth DismissiblePane Implementation within ActionPane? HOT 1
- Slidable widget not closing properly HOT 1
- If more than two SlidableAction, the lable disappear HOT 3
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_slidable.