Skip to content

Try to listen listview drag end event #20385

Closed

Description

@wesleyxiao

Hello,
I am build a list with listview.builder

And use control to listener the scroll position,

I try to get drag release position, when drag down pass some position point, when user release drag , will process function.

When doing the research I haven’t see any information about listview drag start and drag end event maybe there wasn’t have one?

And I try other method was wrap listview inside gestures , tap event is working but all drag vertical event is not working. :(

Activity

  1. wesleyxiao commented on Aug 10, 2018

    @wesleyxiao
    Author

    just found out a solution using listener.

    wrap listview inside listener.

    return new Scaffold(
            appBar: appBar,
            body: new Listener(
                onPointerUp: (_) {
                  tabup = true;
                },
                onPointerDown: (_) {
                  tabup = false;
                },
                child:  put listview here
    ));
      }
    
  2. huuang commented on Nov 20, 2018

    @huuang

    just found out a solution using listener.

    wrap listview inside listener.

    return new Scaffold(
            appBar: appBar,
            body: new Listener(
                onPointerUp: (_) {
                  tabup = true;
                },
                onPointerDown: (_) {
                  tabup = false;
                },
                child:  put listview here
    ));
      }
    

    Your solution helps me, thank you

  3. egulhan commented on May 13, 2020

    @egulhan

    just found out a solution using listener.

    wrap listview inside listener.

    return new Scaffold(
            appBar: appBar,
            body: new Listener(
                onPointerUp: (_) {
                  tabup = true;
                },
                onPointerDown: (_) {
                  tabup = false;
                },
                child:  put listview here
    ));
      }
    

    Thanks for the code snippet and no need to wrap Listener with Scaffold.

  4. added 11 commits that reference this issue on Sep 2, 2020
  5. 23 remaining items

  6. added 12 commits that reference this issue on Sep 26, 2020
  7. added a commit that references this issue on Sep 28, 2020
  8. github-actions commented on Aug 21, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions