Giter VIP home page Giter VIP logo

Comments (3)

huycozy avatar huycozy commented on September 27, 2024

The use case in this issue is similar to the one at #140471. Could you check if it can assemble this?

from flutter.

ashilkn avatar ashilkn commented on September 27, 2024

The use case in this issue is similar to the one described in #140471. Could you check if it can assemble this?

The use case is similar, but I don't need an out-of-the-box solution like the one he wants.

I have already built a multi-select feature in my gallery app. However, the only way to select items now is by individually selecting each one, and I have not yet integrated a "drag-to-select" feature, which is available in most gallery apps.

To build drag-to-select, I was looking for ways to call a callback when the touch pointer enters a widget (a photo in my gallery, in this case) so I can trigger selection for that photo. I discovered the MouseRegion widget, but unfortunately, it doesn't work for touch screens. I was wondering if it's easy to create a similar widget like MouseRegion or make MouseRegion support touchscreens

I tried to figure out how MouseRegion works internally, but had no luck. I would love to create this and contribute to Flutter if you could let me know what documentation to read to understand it better.

from flutter.

huycozy avatar huycozy commented on September 27, 2024

I have the same thought as a user shared at #140471 (comment): it should be built with a new package rather than a built-in feature. Despite that, I will label this to see other's thoughts.

Perhaps #109455 (DragTarget.onWillAccept should trigger when the widget appears under a dragged item (similar toMouseRegion.onEnter)) could be related to this.

from flutter.

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.