hasPermission method
检查麦克风权限
Implementation
Future<bool> hasPermission() async {
try {
print('开始检查麦克风权限...');
_recorderController ??= RecorderController();
final hasPermission = await _recorderController!.checkPermission();
print('AudioWaveforms权限检查: $hasPermission');
return hasPermission;
} catch (e) {
print('权限检查失败: $e');
return false;
}
}