Dart / Flutter中的依赖图? [英] Dependency diagram in Dart/Flutter?

查看:114
本文介绍了Dart / Flutter中的依赖图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法查看我的flutter项目中的程序包如何相互依赖?
软件包下的意思是内部软件包: lib下的文件夹。
另外,检查软件包之间的循环依赖关系也很棒。

Is there a way to see how packages in my flutter project depend on each other? Under packages, I mean internal packages: folders under 'lib'. Also, it would be great to check for circular dependencies between the packages.

推荐答案

虽然我没有找到工具来检测依存关系,我给文件夹加上数字前缀,并按抽象级别对它们进行排序:最高级别在顶部,最低级别在底部。

While I did not find a tool to detect dependencies, I prefix my folders with numbers, ordering them by abstraction level: higher level at the top, and lower level at the bottom.

并且,为了避免循环依赖,我观察了这些包装仅引用了较大的数字,而不是较小的数字:

And, to avoid circular dependencies, I watch the packages to reference only larger numbers, not smaller:

这篇关于Dart / Flutter中的依赖图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆