getCroppedPath static method
Implementation
static Future<String> getCroppedPath(String fullPath) async {
final String croppedPath = '$fullPath.cropped.jpg';
if (_isFileWritable(File(croppedPath))) {
return croppedPath;
}
// In some cases, the location of the directory from
// [BackgroundTaskUpload.getDirectory()] (= "application support" dir)
// may have changed
//
// This issue is mainly on iOS devices, when a support directory can become
// not writable anymore, but is still readable.
return join(
(await BackgroundTaskUpload.getDirectory()).path,
Uri.file(croppedPath).pathSegments.last,
);
}