有没有办法创建一个新的Flutter项目,并生成一些文件或文件夹?

huangapple go评论67阅读模式
英文:

Is there a way to create a new flutter project with some folder or file generated

问题

因此,我一直在为自由职业项目创建许多Flutter应用程序。但是,我有一些设置,我在其中创建了许多文件夹和Dart文件,例如常量、工具等。之后,我开始为某些文件编写相同的代码,例如错误页面和加载小部件。那么,我该如何生成所有这些内容,因为我花费1小时来完成架构设置,实际上才开始项目?

英文:

So I've been creating a lot of flutter apps for freelance projects. However, I have some setup where I created a lot of folders and dart files such as constant, utils and so on. After that, I start writing the same code for a certain file such as the error page and loading widget. So how can I generate all of this since it takes 1 hour for me to finish setup the architecture and actually start the project?

答案1

得分: 1

请看Mason,它可以创建模板Dart代码和其他文件的“砖块”。您可以创建一个个人喜欢的“创建项目”砖块,甚至只是向现有项目添加项目。

英文:

Take a look at Mason which can create "bricks" of templated dart code and other files. You can create a personal favorite "create a project" brick, or even just add items to an existing project.

huangapple
  • 本文由 发表于 2023年3月7日 09:52:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75657381.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定