When creating a plugin project in Flutter, an example app, that is using the plugin, is added in a subfolder of the plugin project. What needs to be done to add a second "example" app to the plugin folder?
So far I have:
Copied and renamed the example folder to (let's call it)
app2.Adjusted the package names at the android manifest files of
app2.Renamed
pluginrootfolder/app2/pluginname_example.imltopluginrootfolder/app2/pluginname_app2.iml(to reflect the name of the second app).In the .iml file of the plugin project (the root folder): Copied and adjusted the exclude folder directive to reflect
app2<excludeFolder url="file://$MODULE_DIR$/app2/.dart_tool" /> <excludeFolder url="file://$MODULE_DIR$/app2/.pub" /> <excludeFolder url="file://$MODULE_DIR$/app2/build" />Run
Flutter cleanandFlutter pub getin both the plugins root directory and app2's directory.
Problem now is that app2 causes 1k+ Target of URI doesn't exist: error messages - from packages (like provider and json_annotation) to classes in the plugin's root project.
Do you have any ideas what's wrong here or how to fix it?