简体   繁体   English

哪些Flutter默认插件很重要?

[英]Which Flutter default plugins are important?

I am relatively new to flutter and app development. 我对Flutter和应用程序开发比较陌生。 I noticed that whenever a new flutter project is created, there are many default plugins pre-loaded into the project and this makes the app take up a minimum of 80 Mb. 我注意到,每当创建一个新的flutter项目时,就会有许多默认插件预先加载到该项目中,这使该应用程序至少占用80 Mb。 Could i get a summary on which plugins are actually important in order to run any app in general? 我能否总结一下哪些插件实际上对运行任何应用程序实际上很重要?

Flutter provides almost all the basic things like themeing, icons, routing etc out of the box. Flutter提供了几乎所有基本内容,例如主题,图标,路由等。

You can have any other package if you need more functionality like fetching data from internet and so on. 如果需要更多功能(例如,从Internet上获取数据等),则可以使用任何其他软件包。

The important thing is the size you see is the debug build which is large as it contains the VM for hot reload to work at such speed. 重要的是,您看到的是调试版本,该版本很大,因为其中包含用于热重装的VM以这种速度工作。 When you build the release version it is the minimum version which goes for about <5Mb on bare-bone app. 当您构建release版本时,它是最低版本,在裸机应用程序上的最低版本约为5Mb。

Currently my debug app stands at around 80mb on emulator but the release version is < 6mb. 目前,我的调试应用在模拟器上的大小约为80mb,但发行版本为<6mb。

So to answer your question, 因此,为了回答您的问题,

  1. it is the debug size,not the final version 这是调试大小,而不是最终版本
  2. Flutter requires no extra plugin for an offline app with basic functionality. Flutter对于具有基本功能的脱机应用程序不需要任何额外的插件。 Core components + testing is provided out of the box. 开箱即用提供核心组件+测试。
  3. Nothing useless is shipped by default, 默认情况下,没有无用的东西,

NOTE : there is a section called dev_dependencies in pubspec.yaml which means the packages listed under this won't go into the release build and are only for development purpose. 注意 :有一个叫段dev_dependenciespubspec.yaml这意味着根据本所列出的程序包将无法进入发布版本,并仅用于开发目的。

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

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