I am trying to access the length of the file using the following code:-
File file = File('/storage/emulated/0/Android/data/com.example.mynewapp/files/Pictures/IMG_20200322_202358.jpg');
final length = await file.length();
and I get the following exception-
FileSystemException: Cannot retrieve length of file, path = '/storage/emulated/0/Android/data/com.example.mynewapp/files/Pictures/IMG_20200322_202358.jpg'
I followed the suggestions from the post and tried without the await:-
final length = file.lengthSync();
also
final length = File(file.resolveSymbolicLinksSync()).lengthSync()
but I end up getting the same exception.