Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Fix: Null check operator used on a null value

ashilknfe8600d569e4
diff --git a/mobile/lib/ui/viewer/file/video_widget_native.dart b/mobile/lib/ui/viewer/file/video_widget_native.dart
index ee912afdbd..77bc07f2d2 100644
--- a/mobile/lib/ui/viewer/file/video_widget_native.dart
+++ b/mobile/lib/ui/viewer/file/video_widget_native.dart
@@ -200,10 +200,12 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>
),
GestureDetector(
behavior: HitTestBehavior.opaque,
- onTap: () {
- _showControls.value = !_showControls.value;
- widget.playbackCallback!(!_showControls.value);
- },
+ onTap: widget.playbackCallback != null
+ ? () {
+ _showControls.value = !_showControls.value;
+ widget.playbackCallback!(!_showControls.value);
+ }
+ : null,
child: Container(
constraints: const BoxConstraints.expand(),
),