Skip to content

Listen event move down with ScrollablePositionedList #155

Open
@patrickcamargo7

Description

@patrickcamargo7

Problem description

Steps to reproduce

I need to listen the event by moving down to hide my appbar and bottombar.

Enviroment

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.5 19F101, locale
pt-BR)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3)
[✓] IntelliJ IDEA Community Edition (version 2019.3.4)
[✓] VS Code (version 1.46.1)
[✓] Connected device (3 available)

Expected behavior

With Scrollcontroller it is possible with the code:


 _scrollBottomBarController.addListener(() {
    if (_scrollBottomBarController.position.userScrollDirection ==
        ScrollDirection.reverse) {
      if (!isScrollingDown) {
        isScrollingDown = true;
        _showAppbar = false;
        hideBottomBar();
      }
    }
    if (_scrollBottomBarController.position.userScrollDirection ==
        ScrollDirection.forward) {
      if (isScrollingDown) {
        isScrollingDown = false;
        _showAppbar = true;
        showBottomBar();
      }
    }
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    SPL-scroll offset watchingScrollablePositonedList requests for being able to watch scroll pixel offsetsp: scrollable_positioned_listRelated to package:scrollable_positioned_list

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions