How to set a dependancy to a Flutter plugin module?


  • My project is basic, with two modules, a plugin module and an app module that depends on the plugin.
  • The plugin should contain a WebView and provide it for the app module.
  • The plugin module does not have a pubspec.yaml file. There is 1 yaml for the project and 1 for the app module.
  • I tried adding "webview_flutter: ^0.3.7" into both app module & project's pubspec.yaml

The problem

  • Flutter cannot resolve / recognise what a "WebView" is inside the lib module, it can do so in the app module.


  • How do I allow my "lib" (plugin) module to recognise the WebView object?