title: type 'Future<PickedFile?>' is not a subtype of type 'Future<File>' , error after migrating to null safety
body: <p>I have recently migrated my flutter app to null safety 2.12.0 , I had to do a lot of changes to my code and I'm only stuck at my image picker and upload functions. I manage to change the null accepted variables. application runs without an issue but after image has been picked its not shown in the ui or go down for other pipe line functions that requires the image file data. I pretty new to flutter and this sudden changes to flutter caused much confusion. I would much appreciate the solution for this and a good explanation of avoiding such problems in the future, thank you !</p>
  <p>Git of entire code &quot;https://github.com/sudaraka93/stack.git&quot;</p>
  <pre><code>  late SharedPreferences sharedPreferences;
    late Size deviceSize;
    Future&lt;File&gt;? file;
    late String base64Image;
    String status = '';
    late File tmpFile;
    String errMessage = 'Error Uploading Image';
    DateTime selectedDate = DateTime.now();
    final TextEditingController CommentController = new TextEditingController();
  
  
    @override
    void initState() {
    }
  
    chooseImage() {
      setState((){
        file =  ImagePicker().getImage(source: ImageSource.gallery) as Future&lt;File&gt;;
      });
    }
  
    startUpload()async {
      setStatus('Uploading Image...');
      if (null == tmpFile) {
        setStatus(errMessage);
        return;
      }
      String fileName = tmpFile.path.split('/').last;
      upload(base64Image);
    }
    Widget showImage() {
      return FutureBuilder&lt;File&gt;(
        future: file,
        builder: (BuildContext context, AsyncSnapshot&lt;File&gt; snapshot) {
          if (snapshot.connectionState == ConnectionState.done &amp;&amp;
              null != snapshot.data) {
            tmpFile = snapshot.data!;
            base64Image = base64Encode(snapshot.data!.readAsBytesSync());
            return Flexible(
                child:Container(
                  child:Image.file(
                    snapshot.data!,
                    fit: BoxFit.fill,
                  ),
                )
            );
          } else if (null != snapshot.error) {
            return const Text(
              '画像の選択エラー',
              textAlign: TextAlign.center,
            );
          } else {
            return const Text(
              '画像が選択されていません',
              textAlign: TextAlign.center,
            );
          }
        },
      );
    }
  </code></pre>