title: Flutter upload file to php server
body: <p>I am following <a href="https://www.fluttercampus.com/guide/7/how-to-pick-file-and-upload-to-php-server-with-progress-percentage/" rel="nofollow noreferrer">this</a> tuturiol but i am using the latest versions of the dependencies in my pubsec file. I have done everything there but i am receiving the following errors.
  On :</p>
  <pre><code>selectFile() async {
      selectedfile = await FilePicker.getFile(
        type: FileType.custom,
        allowedExtensions: ['jpg', 'pdf', 'mp4'],
        //allowed extension to choose
      );
  
      setState((){
  
      }); //update the UI so that file name is shown
    }
  </code></pre>
  <p>I have the error <code>getFile isnt defined for the type FilePicker</code></p>
  <p>also on :</p>
  <pre><code>  FormData formdata = FormData.fromMap({
      &quot;file&quot;: await MultipartFile.fromFile(
          selectedfile.path,
          filename: basename(selectedfile.path)
        //show only filename from path
      ),
    });
  </code></pre>
  <p>I have the error <code>path isnt defined for the type File</code></p>
  <p>The following are the initialized varialbles</p>
  <pre><code>File? selectedfile;
  Response? response;
  String? progress;
  Dio dio = new Dio();
  </code></pre>