File('/data/user/0/com.abc/cache/full.jpg')
.writeAsBytesSync(class_image.encodeJpg(data));
I found out that Android works with this path. But in ios, I found out that it doesn’t work with the error below.
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: FileSystemException: Cannot open file, path = '/data/user/0/com.abc/cache/full.jpg' (OS Error: No such file or directory, errno = 2)
I want to use the same folder for both. Is this possible? If not, the workaround is to manage the ios folder separately?
2
Answers
File(‘/data/user/0/com.abc/cache/full.jpg’) I have observed that you have specified path manually. The path you speicified works only for android but for ios it is completely different.So instead of specifying manually use path provider and create platform specified path then use it