From f28b52faba4e0c76fabf34596a663a38763691e2 Mon Sep 17 00:00:00 2001 From: Giulia Testa <62283724+giuliatesta@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:12:55 +0200 Subject: [PATCH] Added AppLifecycleState.hidden case (fixing build failure on Flutter 3.11.0-16.0.pre) https://docs.flutter.dev/release/breaking-changes/add-applifecyclestate-hidden#migration-guide --- lib/src/ui/reader_widget.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/ui/reader_widget.dart b/lib/src/ui/reader_widget.dart index b8e1447..a875b8c 100644 --- a/lib/src/ui/reader_widget.dart +++ b/lib/src/ui/reader_widget.dart @@ -192,12 +192,14 @@ class _ReaderWidgetState extends State break; case AppLifecycleState.inactive: case AppLifecycleState.paused: + case AppLifecycleState.hidden: controller?.dispose(); setState(() { _isCameraOn = false; }); break; case AppLifecycleState.detached: + default: break; } }