getSavePath property

String get getSavePath

The final generated save path that should be used after the application documents directory to save the file

If the customSavePath is not null it will check if the last character is a "/" to handle and prevent errors customSavePath is "users/images/" will be returned as "users/images/fileName" customSavePath is "users/images" will also be returned as "users/images/fileName" by adding the slash manually.

Implementation

String get getSavePath {
  if (customSavePath != null) {
    if (customSavePath!.endsWith('/')) {
      return '$customSavePath$fileName';
    } else {
      return '$customSavePath/$fileName';
    }
  }

  return fileName;
}