flutter_in_action_2nd icon indicating copy to clipboard operation
flutter_in_action_2nd copied to clipboard

6.4.2 滚动监听勘误

Open jmgaooo opened this issue 2 years ago • 0 comments

    onNotification: (ScrollNotification notification) {
              double progress = notification.metrics.pixels /
                  notification.metrics.maxScrollExtent;
              //重新构建
              setState(() {
                _progress = "${(progress * 100).toInt()}%";
              });
              print("BottomEdge: ${notification.metrics.extentAfter == 0}");
              return false;
              //return true; //放开此行注释后,进度条将失效
            },

测试发现 注释放开后进度条仍然有效

jmgaooo avatar Apr 07 '22 14:04 jmgaooo