Add a plugin to a mono repository

https://bsky.app/profile/sander-roest.bsky.social
Search for a command to run...

https://bsky.app/profile/sander-roest.bsky.social
No comments yet. Be the first to comment.
Running flutter upgrade is not enough...

A necessity or a rip-off?

Both are used by humans, but they are not the same.

Recap part 1. In the previous article about this subject, I explained the limitations that I have ran into, with the default onDidRemovePage implementation. In this article I will show how I’ve overcome or better said, circumvented these limitations....
During the development of my RubigoRouter package I ran into some limitations of the Navigator object that I explain here below. The Flutter Navigator has a mechanism to inform the app about a back navigation event. Historically the onPopPage callbac...
In this part, we are going to add a plugin to an existing mono-repo.
Open a terminal and go to the packages folder.
cd ~/repos/0000000-demo_mono_repo_app-rubigo/packages
fvm flutter create -t plugin --platforms ios,android --org com.example --ios-language objc --android-language java --project-name my_plugin ./my_plugin
Android studio might not detect the new folder. Restarting Android Studio fixes that.
We will use Android Studio to review and commit files.
Choose Commit
Android Studio => File -> Project Structure => Modules => + => Import Module
Navigate to my_plugin folder and choose “Open”. Be aware that the initial folder that Android Studio suggests might not be part of your current project.
Select “Create module from existing sources”, choose “Next”
Deselect all lines, except the one with Flutter, choose “Next”
Deselect all, choose “Finish”
Choose “Commit”
Open demo_mono_repo_app/pubspec.yaml and add my_plugin, and run pub get.

Choose “Commit”
With some small changes, we can call MyPlugin.platformVersion, which gets information about the current OS.


Choose “Commit”
These are all the steps that are needed to add a plugin to the mono-repo.
The app final app can be downloaded from:
https://github.com/jsroest/0000000-demo_mono_repo_app-rubigo
