title: keep getting error "No implementation found for method getApplicationDocumentsDirectory"
body: <p>I'm trying to use path_provider to save html files. Here is my function:</p>
  
  <pre><code> Future&lt;Null&gt; createHtmlFile(String content) async {
      // Get the system temp directory.
      final directory = await getApplicationDocumentsDirectory();
  
  
  
      var file = await File(
              '${directory.path}/html/webpage${DateTime.now().toString()}.html')
          .create(recursive: true)
        ..writeAsString(content);
      print(file.path);
    }
  </code></pre>
  
  <p>but i keep getting this error:</p>
  
  <pre><code>[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)
  </code></pre>
  
  <p>at first the path provider didn't appear in <code>GeneratedPluginRegistrant.m</code> and <code>GeneratedPluginRegistrant.java</code> so i fought withe it, removed it from <code>pubspec.yaml</code> and installed it again and after couple times doing restarts and flutter clean and run the package appears in the files above </p>
  
  <p>but i still getting that error
  i tired everything 
  <code>flutter packages get</code>
  <code>flutter update-packages --force-upgrade</code>
  <code>flutter upgrade</code>
  <code>Flutter clean</code></p>