Home > Mobile >  How to create a non published flutter plugin with versioning enabled?
How to create a non published flutter plugin with versioning enabled?

Time:01-10

I am a freelancer. I wrote a plugin dependency to share among my projects for codes such as api calls and common UIs. The problem is, every time I do a breaking change such as changing a class name, I have to update the class name in all projects. I do not want to publish my plugin to pub.dev, is there a way that I can add versioning for my own plugin so that I do not have to update all projects at the same time? I am currently using my plugin like this in pubspec.yaml

dependencies:
    my_plugin:
        path: /Users/myself/Documents/my_plugin

CodePudding user response:

  • Consider setting up a fork for your plugin project? When you test, instead of referencing the plugin, specify the git branch separately

  • like this


dependencies:

myplugin:
    url: git://github.com/munificent/kittens.git
 ref: some-branch

  • Related