fix: duration-picker not working (#134)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-11-08 14:48:08 +01:00 committed by GitHub
parent 59a5fa6ac6
commit 35e74258d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 14 deletions

View file

@ -56,7 +56,7 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
double dragUpDelta = 0.0;
final controller = TextEditingController();
late final timerController = RestarableTimerController(
late final timerController = RestartableTimerController(
ref.read(photoViewSettingsProvider).timer, const Duration(milliseconds: 32), onTimeout: () {
if (widget.pageController.page == widget.itemCount - 1) {
widget.pageController.animateToPage(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut);
@ -146,6 +146,7 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
return PopScope(
onPopInvokedWithResult: (didPop, result) async => await WakelockPlus.disable(),
child: InputHandler(
autoFocus: false,
onKeyEvent: (node, event) => _onKey(event) ? KeyEventResult.handled : KeyEventResult.ignored,
child: Stack(
children: [