title: How to load images in asset folder in file object? I am getting an error "No such file or directory, errno = 2"
body: <p>I am trying to implement aws_ai plugin for flutter <a href="https://pub.dev/packages/aws_ai" rel="nofollow noreferrer">https://pub.dev/packages/aws_ai</a> for Face Comparision with AWS Rekognition. The code is stated clearly in the example. It says load image in the object type file. How to do it? </p>
  
  <p>assume that my image, abc.jpg is in asset folder: 
  - they are initialized in pubspec.yaml and I have run flutter packages get</p>
  
  <p>I have tried <code>Image.file(File('assets/abc.jpg'))</code>: it throws the error that image type cannot be assigned to file type. </p>
  
  <p>I have also tried <code>var sourceImagefile = new File('assets/abc.jpg');</code> : it is throwing the error of no such file</p>
  
  <pre><code>import 'package:aws_ai/src/RekognitionHandler.dart';
  
  ---&gt; File sourceImagefile, targetImagefile; //load source and target images in those File objects
  String accessKey, secretKey, region ; //load your aws account info in those variables
  
  RekognitionHandler rekognition = new RekognitionHandler(accessKey, secretKey, region); 
  Future&lt;String&gt; labelsArray = rekognition.compareFaces(sourceImagefile, targetImagefile);
  </code></pre>
  
  <p>I need code for input to be given at ---> line. Thanks for the help!</p>