0

I have a public lib written in flutter, when I develop the app in local machine. I just want to modify the public lib and make it take effect immediately. In the production environment, I want the app using the published lib. is it possible to archive this in flutter. when switch with develop and production environment, I do not want to change the pubspec.yaml every time, it seems like the npm link. does flutter do like this possible?

the workflow I am doing is:

  • modify the public lib
  • publish to public repo
  • change the app version and update the app to make it using the new lib

what I want:

  • modify the public lib
  • using the public lib modified code in current app
  • debugging passed, publish the public lib, publish the local app and no need to modify the local app pubspec.yaml
spark
  • 663
  • 1
  • 5
  • 18

1 Answers1

1

yes, you can specify the path to the local package directory in your app's pubspec.yaml

dependencies:
  my_package:
    path: /path/to/my_package

for further information, you could check this how to use local flutter package in another flutter application?

Dewa Prabawa
  • 497
  • 2
  • 11