From bee9694f344f80ebd93158576b730a06f9e263c2 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:13:14 +0530 Subject: [PATCH] [mob] Add mount check --- .../ui/viewer/file/native_video_player_controls/seek_bar.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart b/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart index f37791d56e..dafd812db4 100644 --- a/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart +++ b/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart @@ -112,6 +112,9 @@ class _SeekBarState extends State with SingleTickerProviderStateMixin { //Video starts playing after a slight delay. This delay is to ensure that //the seek bar animation starts after the video starts playing. Future.delayed(const Duration(milliseconds: 700), () { + if (!mounted) { + return; + } if (widget.duration != null) { unawaited( _animationController.animateTo(