hasPermission method
Implementation
@override
Future<bool?> hasPermission() async {
bool? status;
try {
final cameras = await availableCameras();
if (cameras.isNotEmpty) {
status = true;
} else {
status = null;
}
return status;
} catch (error) {
status = false;
return status;
}
}