title: how to get the path of an image in flutter?
body: <p>in my app y take a photo and then save it in the device, but then i dont know how to get the path of that image, cause the dir is root. this my code:</p>
  
  <p>This is where i take the photo:</p>
  
  <pre><code>  Future&lt;String&gt; takePicture() async {
  if (!controller.value.isInitialized) {
    showInSnackBar('Error: select a camera first.');
    return null;
  }
  final Directory extDir = await getApplicationDocumentsDirectory();
  final String dirPath = '${extDir.path}/Pictures/flutter_test';
  await new Directory(dirPath).create(recursive: true);
  final String filePath = '$dirPath/${timestamp()}.jpg';
  
  if (controller.value.isTakingPicture) {
    // A capture is already pending, do nothing.
    return null;
  }
  
  try {
    await controller.takePicture(filePath);
  } on CameraException catch (e) {
    _showCameraException(e);
    return null;
  }
  return filePath;
  </code></pre>
  
  <p>}</p>
  
  <p>this is the trigger:</p>
  
  <pre><code>  void onTakePictureButtonPressed() {
  takePicture().then((String filePath) {
    if (mounted) {
      setState(() {
        imagePath = filePath;
        videoController?.dispose();
        videoController = null;
      });
  
  
      upload(File(filePath));
  
      print(filePath);
      if (filePath != null) showInSnackBar('Picture saved to $filePath');
    }
  });
  </code></pre>
  
  <p>}</p>
  
  <p>and this is where i want to send the image in formdata:</p>
  
  <pre><code>    upload(File imageFile) async {
    // open a bytestream
    var stream = new http.ByteStream(DelegatingStream.typed(imageFile.openRead()));
    // get file length
    var length = await imageFile.length();
  
    // string to uri
    var uri = Uri.parse("http://ip/something/else/here");
  
    // create multipart request
    var request = new http.MultipartRequest("POST", uri);
  
    // multipart that takes file
    var multipartFile = new http.MultipartFile('file', stream, length,
        filename: basename(imageFile.path));
  
    // add file to multipart
    request.files.add(multipartFile);
  
    // send
    var response = await request.send();
    print(response.statusCode);
  
    // listen for response
    response.stream.transform(utf8.decoder).listen((value) {
      print(value);
    });
  }
  </code></pre>
  
  <p>when i take a photo thats returns:</p>
  
  <blockquote>
    <p>{"error":"http: no such file"}</p>
  </blockquote>
  
  <p>it's as if the api did not receive anything.
  i think is because the location is only root.</p>
  
  <p>how can i modify that to access to the image?</p>