1

I want to save the image permanent directory. The problem I'm having its one i take a picture using the image picker widget and move he image from the temp file to a permanent one it works. but if I rebuild the app the image can't be found.

This is the piece of code that save the image to a "permananent directory"

    final directory = await getApplicationDocumentsDirectory();
    final name = p.basename(imagePath);

    final image = File('${directory.path}/$name');

    return File(imagePath).copy(image.path);
  }```

I have being going on this all day. i will apreaciate the help
Millenial2020
  • 2,465
  • 9
  • 38
  • 83
  • This could help: https://retroportalstudio.medium.com/saving-files-to-application-folder-and-gallery-in-flutter-e9be2ebee92a – stacktrace2234 Aug 26 '21 at 03:04
  • this could help https://stackoverflow.com/questions/51338041/how-to-save-image-file-in-flutter-file-selected-using-image-picker-plugin – Abhijith Aug 26 '21 at 05:02

0 Answers0