Comments (8)
I think that's totally possible, but the default behavior should be the current one. I could work on the implementation next week, but PRs are always welcome!
from flutter_speed_dial.
i fear since you updated your code, it's not as easy possible as before.. the reason is that you're using a AnimatedFloatingButton which cannot have a long-press-handler (because the long press triggers the label..)...
Previously it was possible.. see my commit (i know, it's not a PR, but i was unsure about it at that time..)
Anyway: should i close the issue since its now complicated to implement it? (and it seems, nobody but me wants it anyway :D )?
from flutter_speed_dial.
The AnimatedFloatingButton
is actually a custom widget provided by the library itself. It would be totally possible to implement the behavior you need, just add a function parameter to override the press callback and a boolean parameter to toggle the dial on long press.
Let me know if you need help with the implementation, even if you're not sure I can review it and eventually fix it.
from flutter_speed_dial.
@darioielardi thanks for the encouraging reply. I mentioned the wrong class.. i meant FloatingActionButton
instead of AnimatedFloatingButton
. In that class, no longPress is intended. Anyway: i noticed, that i can combine it with a gestureListener (even if not intended) to work around that.. You would have a look at my solution? In that case, i'll open an PR :)
Thanks again :)
from flutter_speed_dial.
The GestureDetector
looks a pretty valid solution, but I noticed you've also modified the behavior of the BackgroundOverlay
, I'm not sure it should act as the main button does when the onPress
parameter is defined, it should probably keep the old behavior, long press on the background overlay does not really make sense. Apart from that your implementation is fine, if you fix the overlay behavior ( and please format your code with the dart formatter ) I'd be happy to test it and merge the PR :)
from flutter_speed_dial.
hi @darioielardi i removed the longPress-stuff in the overlay... it was a leftover from my first try and i forgot to delete it.. furthermore, i formated it with flutter format .
from flutter_speed_dial.
Merged, thank you for the contribution, nice work :)
from flutter_speed_dial.
Thanks :)
from flutter_speed_dial.
Related Issues (20)
- Error if pop a route in onTap HOT 4
- Transparent background for children HOT 4
- No Functionality on Next Page after Navigator.of(context).pushNamed
- Lag on iOS devices the first time the speed dial is opened HOT 1
- error when building for web please update HOT 5
- fix this isssue please HOT 3
- Update to Flutter 3.10.0
- flutter_speed_dial 6.3.0 issues
- Icons not showing and being replaced with random Icons HOT 1
- Can't use SVG for FAB icon and active icon HOT 2
- Children are cut off when the screen size is too small HOT 5
- Feature Request: Circular menu HOT 1
- The child gets smaller. HOT 2
- Support for SpeedDialChild to have variable width (Using Extended Fabs as child)? HOT 2
- Lag when clicking SpeedDial for the first time after opening the app
- Pending timer exception on widget test
- Elevation on mouse over and open HOT 1
- rtl support HOT 3
- While using SpeedDial can't use Get.to() popGesture HOT 2
- Please implement functionality for the app bar (feature)
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_speed_dial.