Git Product home page Git Product logo

Comments (7)

Charon922 avatar Charon922 commented on June 6, 2024 6

@rosbal Hi, I figured out how to solve it.

Need to modify the original code.
Add a dismiss function
static void dismissMenu() { if (overlayEntry != null) { overlayEntry.remove(); overlayEntry = null; _controller.clear(); _focusNode.unfocus(); } }
And then make the overlay into a stack and make the bottom layer take up the full screen, wrap it's child in a GestureDetector that calls:
return Stack(children: <Widget>[ Positioned.fill( child: GestureDetector( onTap: dismissMenu, child: Container( color: Colors.transparent, ), )), Positioned( left: position.left, width: width, child: CompositedTransformFollower( .....

from search_widget.

dleurs avatar dleurs commented on June 6, 2024 1

Here is the code thanks to Charon922 comment ! I will try to make a pull request
search_widget copie.dart.txt

from search_widget.

Enigma-I-am avatar Enigma-I-am commented on June 6, 2024 1

Thank you much @dleurs

from search_widget.

Charon922 avatar Charon922 commented on June 6, 2024

image
And when I scroll the screen, it is being wired.

from search_widget.

rosbal avatar rosbal commented on June 6, 2024

Same question. There should be a way to dismiss the popup by tapping anywhere outside the popup (at the very least on tapping the TextField). The only way to dismiss the popup seems to be selecting a list item.

from search_widget.

rosbal avatar rosbal commented on June 6, 2024

@Charon922

Worked like a charm. Thanks for sharing.

from search_widget.

Enigma-I-am avatar Enigma-I-am commented on June 6, 2024

@rosbal Hi, I figured out how to solve it.

Need to modify the original code.
Add a dismiss function
static void dismissMenu() { if (overlayEntry != null) { overlayEntry.remove(); overlayEntry = null; _controller.clear(); _focusNode.unfocus(); } }
And then make the overlay into a stack and make the bottom layer take up the full screen, wrap it's child in a GestureDetector that calls:
return Stack(children: <Widget>[ Positioned.fill( child: GestureDetector( onTap: dismissMenu, child: Container( color: Colors.transparent, ), )), Positioned( left: position.left, width: width, child: CompositedTransformFollower( .....

Hello...
@Charon922 I am having this same issue and I don't understand your solution, Where do you make these changes?? and would you be able to give a more detailed example.

Please do forgive me If this sounds like an awkward request I am new to flutter

from search_widget.

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.