I took a picture with the camera and I got its path
/data/user/0/com.example.tarea_8/cache/CAP8057460019038129642.jpg
I tried to display it like this
var imagePath = '/data/user/0/com.example.tarea_8/cache/CAP8057460019038129642.jpg';
Image.file(File(imagePath));
But I got this error
The argument type 'File (where File is defined in C:\flutter\bin\cache\pkg\sky_engine\lib\html\html_dart2js.dart)' can't be assigned to the parameter type 'File (where File is defined in C:\flutter\bin\cache\pkg\sky_engine\lib\io\file.dart)'. (Documentation)
File is defined in C:\flutter\bin\cache\pkg\sky_engine\lib\html\html_dart2js.dart (html_dart2js.dart:144).
File is defined in C:\flutter\bin\cache\pkg\sky_engine\lib\io\file.dart (file.dart:144).
2 positional argument(s) expected, but 1 found. (Documentation)
dart:html (new) File File( List fileBits, String fileName, [ Map ? options, ]
I saw that someone had the same problem 3 year ago here. I followed the solution steps to the letter but it didn't work for me.
I am using Android Studio and the version of the installed plugins are Dart
211.7808 & Flutter
65.2.2