简体   繁体   English

如何在同一个窗口中添加两个flutter项目和核心库(包dart插件)

[英]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).我想创建两个flutter应用程序,它们通过另一个flutter包(核心包)共享很多功能。

I want to open two projects and core package in the same window using Android Studio.我想使用 Android Studio 在同一个窗口中打开两个项目和核心包。

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.这样,您将核心项目引用为 app1 和 app2 依赖项。

Look this project as example: https://github.com/roughike/inKino .以这个项目为例: https : //github.com/roughike/inKino It shares core project on flutter app and web app.它在 flutter app 和 web app 上共享core项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM