mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
fix: duration-picker not working (#134)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
59a5fa6ac6
commit
35e74258d9
5 changed files with 26 additions and 14 deletions
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ class VideoPlayerNextWrapper extends ConsumerStatefulWidget {
|
|||
class _VideoPlayerNextWrapperState extends ConsumerState<VideoPlayerNextWrapper> {
|
||||
bool show = false;
|
||||
bool showOverwrite = false;
|
||||
late RestarableTimerController timerController =
|
||||
RestarableTimerController(const Duration(seconds: 30), const Duration(milliseconds: 33), onTimeout: onTimeOut);
|
||||
late RestartableTimerController timerController =
|
||||
RestartableTimerController(const Duration(seconds: 30), const Duration(milliseconds: 33), onTimeout: onTimeOut);
|
||||
|
||||
void onTimeOut() {
|
||||
timerController.cancel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue