ScrollController not attached to any scroll views

前端 未结 11 1164
难免孤独
难免孤独 2021-01-17 07:22

I\'m using CustomScrollView, and providing it with a controller. ScrollController works, I even added a listener to it and print out the position of the scroll view.

11条回答
  •  迷失自我
    2021-01-17 07:59

    I used this code to make the color of the appbar transparent at 0 position and black for more than 70

    backgroundColor: !_scrollController.hasClients
                ? Colors.transparent
                : _scrollController.offset > 70
                    ? Color.fromRGBO(7, 7, 7, 1)
                    : Colors.transparent,
    

提交回复
热议问题