getDefaultPath method

Future<String> getDefaultPath()

Implementation

Future<String> getDefaultPath() async {
  if (_localPath != null) return _localPath!;
  var directory;

  if (Platform.isIOS) {
    directory = await getApplicationDocumentsDirectory();
  } else {
    directory = await getExternalStorageDirectory();
  }

  _localPath = "${directory.path}/${Constants.DIRECTORY_NAME}";
  return _localPath!;
}