mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
fix #70
This commit is contained in:
parent
672a8cff01
commit
e9c56425ee
2 changed files with 12 additions and 10 deletions
|
|
@ -15,7 +15,8 @@ Future<bool> checkPermissions() async {
|
|||
return false;
|
||||
}
|
||||
if (!await Permission.microphone.isGranted) {
|
||||
return false;
|
||||
// microphone is only needed when
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -25,17 +26,17 @@ class PermissionHandlerViewState extends State<PermissionHandlerView> {
|
|||
// You can request multiple permissions at once.
|
||||
Map<Permission, PermissionStatus> statuses = await [
|
||||
Permission.camera,
|
||||
Permission.microphone,
|
||||
// Permission.microphone,
|
||||
Permission.notification
|
||||
].request();
|
||||
|
||||
if (statuses[Permission.microphone]!.isPermanentlyDenied) {
|
||||
openAppSettings();
|
||||
// setState(() {});
|
||||
} else {
|
||||
// if (statuses[Permission.microphone]!.isDenied) {
|
||||
// }
|
||||
}
|
||||
// if (statuses[Permission.microphone]!.isPermanentlyDenied) {
|
||||
// openAppSettings();
|
||||
// // setState(() {});
|
||||
// } else {
|
||||
// // if (statuses[Permission.microphone]!.isDenied) {
|
||||
// // }
|
||||
// }
|
||||
|
||||
if (statuses[Permission.camera]!.isPermanentlyDenied) {
|
||||
openAppSettings();
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
|||
setState(() {
|
||||
isZoomAble = false;
|
||||
});
|
||||
controller = CameraController(gCameras[sCameraId], ResolutionPreset.high);
|
||||
controller = CameraController(gCameras[sCameraId], ResolutionPreset.high,
|
||||
enableAudio: false);
|
||||
controller.initialize().then((_) async {
|
||||
if (!mounted) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue