path property

Future<String> path

Returns the local path on the device where sound files can be stored. Creates the directory, if not existing.

Implementation

Future<String> get path async {
  if (_path == null) {
    // create a sub-directory for sound files
    final directory = await Directory(
            '${await Settings().getDeploymentBasePath(deployment!.studyDeploymentId)}/${Settings.CARP_DATA_FILE_PATH}/$AUDIO_FILES_PATH')
        .create(recursive: true);

    _path = directory.path;
  }
  return _path!;
}