checkPermission method
Checks if the specified permission type is granted.
The type parameter should be the name of the permission to check (e.g., "Camera", "Location").
Returns true if the permission is granted, otherwise false.
If an error occurs during the check, it logs the error and returns false.
Implementation
Future<bool> checkPermission(String type) async {
try {
return await BasecraftPlatform.instance.checkPermission("check$type");
} catch (e) {
debugPrint("🛑 Error checking permission for $type: $e");
return false;
}
}