-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the single page and double column reading direction, support mouse…
… wheel page turning Fix the bug that the modification of the image interval on the reading page does not take effect immediately 单页和双列阅读方向下,支持鼠标滚轮翻页 修复阅读页修改图片间隔时,无法立即生效的bug
- Loading branch information
1 parent
0e760fe
commit dec59d4
Showing
7 changed files
with
85 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:flutter/gestures.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class EHWheelListener extends StatelessWidget { | ||
final Widget child; | ||
final ValueChanged<PointerScrollEvent>? onPointerScroll; | ||
|
||
const EHWheelListener({Key? key, required this.child, this.onPointerScroll}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Listener( | ||
onPointerSignal: (PointerSignalEvent event) { | ||
if (event is PointerScrollEvent) { | ||
onPointerScroll?.call(event); | ||
} | ||
}, | ||
child: child, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters