GithubHelp home page GithubHelp logo

Comments (8)

3vilcrow avatar 3vilcrow commented on June 4, 2024 1

thank you very much by adjusting the offset I was able to center it although it is a bit static it can be achieved. As for the animation, if it is not doing the reverse effect, thanks for answering!

from dropdown_button2.

3vilcrow avatar 3vilcrow commented on June 4, 2024 1

_fadeOpacity = CurvedAnimation(
parent: widget.route.animation!,
curve: const Interval(0.0, 0.25),
reverseCurve: const Interval(0.0, 1.0),
);
_resize = CurvedAnimation(
parent: widget.route.animation!,
curve: const Interval(0.25, 1.0),
reverseCurve: const Interval(0.0, 0.75),
);

I put this configuration and it is quite good, thanks dude

from dropdown_button2.

AhmedLSayed9 avatar AhmedLSayed9 commented on June 4, 2024

Do you want the menu not to open below the button? You can use Offset parameter to change the menu position.If you could provide a sample of what you want to do would be better to help.

Also, I think when the menu is closed the animation is already reversed.

from dropdown_button2.

3vilcrow avatar 3vilcrow commented on June 4, 2024

I was looking at the package code and found the code to reverse the animation

@OverRide
bool didPop(T?result) {
assert(_controller != null, '$runtimeType.didPop called before calling install() or after calling dispose().');
assert(!_transitionCompleter.isCompleted, 'Cannot reuse a $runtimeType after disposing it.');
_result = result;
_controller!.reverse();
return super.didPop(result);
}

But it seems that the method is not being called or is not entering

from dropdown_button2.

AhmedLSayed9 avatar AhmedLSayed9 commented on June 4, 2024

Check line 265

from dropdown_button2.

AhmedLSayed9 avatar AhmedLSayed9 commented on June 4, 2024

I've tested the animation reverse when menu closed and it's working fine.
The menu close animation "reverseCurve" is faster than menu open animation "curve" That's why it can't be noticed clearly, but you could notice it if you spam tapping the button.

from dropdown_button2.

3vilcrow avatar 3vilcrow commented on June 4, 2024

Yes, when I do it repeatedly I notice it but not when I touch it when it is fully open

from dropdown_button2.

AhmedLSayed9 avatar AhmedLSayed9 commented on June 4, 2024

Yes, That's how Flutter's dropdown behaviour works.
If you would like to edit it, start at line 265 you'll find the animation reversedCurve

from dropdown_button2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.