From b793bfc2204c9b906f5f7640b8bc8a5ac7cacf72 Mon Sep 17 00:00:00 2001 From: Doan Dinh Date: Fri, 28 Oct 2022 14:59:28 +0700 Subject: [PATCH] [#101] Use Camera permission as sample --- .../utils/wrappers/permission_wrapper.dart | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/.template/lib/utils/wrappers/permission_wrapper.dart b/.template/lib/utils/wrappers/permission_wrapper.dart index 9fb6dbcf..e46a7515 100644 --- a/.template/lib/utils/wrappers/permission_wrapper.dart +++ b/.template/lib/utils/wrappers/permission_wrapper.dart @@ -8,14 +8,6 @@ abstract class PermissionWrapper { Future isCameraPermissionDenied(); Future isCameraPermissionPermanentlyDenied(); - - Future requestGalleryPermission(); - - Future isGalleryPermissionDenied(); - - Future isGalleryPermissionPermanentlyDenied(); - - Future openAppSettings(); } @Singleton(as: PermissionWrapper) @@ -36,26 +28,4 @@ class PermissionWrapperImpl extends PermissionWrapper { Future isCameraPermissionPermanentlyDenied() { return permission_handler.Permission.camera.isPermanentlyDenied; } - - @override - Future isGalleryPermissionDenied() { - return permission_handler.Permission.photos.isDenied; - } - - @override - Future isGalleryPermissionPermanentlyDenied() { - return permission_handler.Permission.photos.isPermanentlyDenied; - } - - @override - Future requestGalleryPermission() { - return permission_handler.Permission.photos - .request() - .then((value) => value == permission_handler.PermissionStatus.granted); - } - - @override - Future openAppSettings() { - return permission_handler.openAppSettings(); - } }