user3087269
user3087269

Reputation: 43

How to add two flutter projects and core library (package dart plugin) in the same window

I want to create two flutter applications which share a lot of functions through another flutter package (core package).

I want to open two projects and core package in the same window using Android Studio.

Upvotes: 3

Views: 1850

Answers (1)

Rubens Melo
Rubens Melo

Reputation: 3315

You can have this structure:

/core - a pure dart code, with dependencies, etc
/app1 - in this pubspec.yaml, just put: as dependencie:
    core: 
      path: ../core
/app2
    core: 
      path: ../core

This way, you are referencing you core project as app1 and app2 dependencie.

Look this project as example: https://github.com/roughike/inKino . It shares core project on flutter app and web app.

Upvotes: 6

Related Questions