Browse Source

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
pull/99/head
Giulia Testa 1 year ago committed by GitHub
parent
commit
f28b52faba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/src/ui/reader_widget.dart

2
lib/src/ui/reader_widget.dart

@ -192,12 +192,14 @@ class _ReaderWidgetState extends State<ReaderWidget>
break;
case AppLifecycleState.inactive:
case AppLifecycleState.paused:
case AppLifecycleState.hidden:
controller?.dispose();
setState(() {
_isCameraOn = false;
});
break;
case AppLifecycleState.detached:
default:
break;
}
}

Loading…
Cancel
Save