Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter : Dependencies vs dev_dependencies [duplicate]

Tags:

flutter

dart

enter image description here I want know different between dependencies and dev_dependencies.

When i put package in dependencies/dev_dependencies ?

What put package in dependencies/dev_dependencies make size APK be bigger? ( i not yet try release apk to see different size)

Because i use extension in visual studio code Pubspec Assist, this extension auto add dependencies to pubspec.yaml

Thank's

like image 423
Zeffry Reynando Avatar asked Sep 02 '19 04:09

Zeffry Reynando


People also ask

What is difference between dependencies and Devdependencies in flutter?

dev_dependencies are modules which are only required during development, while dependencies are modules which are also required at runtime.

What are different types of dependencies in flutter?

There are two types of dependencies, one is regular and the other is dev. dependencies: Regular dependencies are listed under dependencies:—these are packages that anyone using your package will also need.

How do you resolve dependency conflicts in flutter?

Solution: The fastest way to resolve this problem is to set the versions of both of the conflicting dependencies to any . pubspec. yaml dependencies: # ... xml: any # <- don't leave me like this - read further!


2 Answers

dependencies

List of plugins that we have to include while deploying your App after completion of your development stage.

dev_dependencies

List of plugins that you want to try out at the development stage to test the apps at development stage.

For example: In the development stage, we use Mockito and test plugins and SDK to write the test cases and to test the complete behaviour of the app. These kind of plugins and SDK's we include in

dev_dependencies

So in the release apps, there is no need of adding these plugins or sdk support.

like image 57
hemandroid Avatar answered Sep 19 '22 11:09

hemandroid


dependencies are packages that are included in your app during compilation while dev_dependencies are packages that you use during developing your app and these are not included in the APK

like image 38
digitaljoni Avatar answered Sep 18 '22 11:09

digitaljoni