checkPermission method

Future<bool> checkPermission()

This method can be used to check microphone permission. Returns true if we have permission else false.

This method is called during record().

Implementation

Future<bool> checkPermission() async {
  final result = await AudioWaveformsInterface.instance.checkPermission();
  if (result) {
    _hasPermission = result;
  }
  notifyListeners();
  return _hasPermission;
}