title: Flutter can't open file path
body: <p>When I want to convert my image to imagebytes, i take this error. My image type is Asset:</p>
  <pre><code>[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FileSystemException: Cannot open file, path = 'content://media/external/images/media/27' (OS Error: No such file or directory, errno = 2)
  </code></pre>
  <pre><code>_saveToDatabase() async {
  if (!mounted) return;
  String base64Image;
  var dbHelper = DatabaseHelper();
  for (var i in images) {
    List&lt;int&gt; imageBytes = File(i.identifier).readAsBytesSync(); //this step i get error
    base64Image = base64Encode(imageBytes);
    DateTime imageDate = DateTime.now();
    var image = ImageModel(base64Image, imageDate);
    dbHelper.saveImage(image);
    debugPrint(
        &quot;Added: \n${imageBytes.toString()}\n${base64Image.toString()}&quot;);
    setState(() {});
   }
  }
  
  
  import 'dart:io';
  
  class ImageModel{
  
   int id;
   String image;
   DateTime imageDate;
  
  
   ImageModel(this.image, this.imageDate,);
  
   ImageModel.fromMap(Map map) {
    id= map[id];
    image = map[image];
    imageDate = map[imageDate];
   }
  
  }
  </code></pre>
  <p><img src="https://i.stack.imgur.com/a9qqM.png" alt="error image is here" /></p>