Rakesh Kr
Rakesh Kr

Reputation: 49

Can we create shared library or assembly like .dll in flutter package project?

I'm getting problem with flutter/dart. I created one flutter-package using dart lang, there is so many dart files. But i didn't get any option to make single lib file or assembly like dll (dll in Xamarin). I want to use that API in flutter mobile app [Android/iOS]. So is it possible to make single lib file in dart ? I don't want to show a source code to that person, who will use my API in Android/iOS & I don't want to publish my code to pub.dev.

I hope this is possible.

Thanks, i would be grateful.

Upvotes: 4

Views: 4050

Answers (1)

krishnakumarcn
krishnakumarcn

Reputation: 4199

You can store your package on your git repository and access them.

If the package is located at the root of the repo, use the following syntax:

dependencies:
  plugin1:
    git:
      url: git://github.com/test/plugin1.git

https://flutter.dev/docs/development/packages-and-plugins/using-packages

Upvotes: 2

Related Questions