pub.dev is the main resource where packages and plugins are published. You can look for packages or publish them for other users. A few very important points to note are the following:
- All packages are open source.
- Once published, packages cannot ever be removed.
- All packages can only depend on other published packages.
All these rules benefit the end user. If you use a package from pub.dev, you always know that your packages will remain available. They can be used without any limitations, and do not have hidden dependencies that follow different rules.
The pubspec.yaml file is written in YAML, which is a language mainly used for configurations. It is a superset of JSON, with key-value pairs. The most important feature to understand in yaml is that it uses indentation for nesting, so you need to pay attention to how you use indentation and spacing, as it may raise unexpected errors when used inappropriately.
The following command imports the http package...