A plug-in is a type of package—the full name is a plug-in package, and it is generally referred to as a plug-in.
Packages:
At minimum, a Dart package is a directory containing a pubspec file. Additionally, packages can contain dependencies (listed in the pubspec), Dart libraries, applications, resources, tests, images, and samples. The pub.dev website lists many packages—developed by Google engineers and generous members of the Flutter and Dart communities—that you can use in your applications.
Plugins:
A plugin package is a special package that enables an application to use platform features. Plugin packages can be written for Android (using Kotlin or Java), iOS (using Swift or Objective-C), web, macOS, Windows, Linux, or any combination thereof. For example, a plugin might provide a Flutter app with the ability to use the device’s camera.
2
Answers
The simple easy answer to that question is:
A
package
contains only Dart code.A
plugin
contains both Dart code and Native code (kotlin/js/swift/…)A
package
can useplugins
if it wants to. It will still be qualified as apackage
.A plug-in is a type of package—the full name is a plug-in package, and it is generally referred to as a plug-in.
Packages:
At minimum, a
Dart
package is a directory containing apubspec
file. Additionally, packages can contain dependencies (listed in thepubspec
),Dart
libraries, applications, resources, tests, images, and samples. The pub.dev website lists many packages—developed by Google engineers and generous members of the Flutter and Dart communities—that you can use in your applications.Plugins:
A plugin package is a special package that enables an application to use platform features. Plugin packages can be written for Android (using
Kotlin
orJava
), iOS (usingSwift
orObjective-C
), web, macOS, Windows, Linux, or any combination thereof. For example, a plugin might provide a Flutter app with the ability to use the device’s camera.