Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Feb 27, 2024
1 parent 678e922 commit ee6348e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/widget/custom_sliver/scroll_header_demo_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ class _ScrollHeaderDemoPageState extends State<ScrollHeaderDemoPage>
if (notification is ScrollUpdateNotification) {
if (initLayoutExtent > 0) {
if (notification.metrics.pixels < -showPullDistance) {
globalKey.currentState!.handleShow();
///用户松手之后才触发完全展开显示
if (notification.dragDetails == null) {
globalKey.currentState?.handleShow();
controller.jumpTo(-(showPullDistance + 1));
}
} else if (notification.metrics.pixels > 5) {
globalKey.currentState!.handleHide();
}
Expand Down

0 comments on commit ee6348e

Please sign in to comment.