Home > Net >  Image does not load after second index but hard coding path works flutter
Image does not load after second index but hard coding path works flutter

Time:07-22

I am having weird issue images after second index is not being read. I am reading file from my app directory. Even though path is correct still it does not read. but hard coding path works. I have posted some code that i thought was necessary if you need please comment to tell me. so this is in this photo you can see

Exception details

======== Exception caught by image resource service ================================================
The following FileSystemException was thrown resolving an image codec:
Cannot open file, path = ' /data/user/0/com.example.healamic/app_flutter/image_picker2935344680116023215.jpg' (OS Error: No such file or directory, errno = 2)

When the exception was thrown, this was the stack: 
#0      _File.open.<anonymous closure> (dart:io/file_impl.dart:356:9)
<asynchronous suspension>
#3      FileImage._loadAsync (package:flutter/src/painting/image_provider.dart:873:29)
<asynchronous suspension>
(elided 2 frames from dart:async)
Path:  /data/user/0/com.example.healamic/app_flutter/image_picker2935344680116023215.jpg

CodePudding user response:

check it there is space before

' /data/user/0/com.example.healamic/app_flutter/image_picker293534468011602'

  • Related