skip to Main Content

Difference between package and plugin? Easy and Basic??

Easy Answer which we can say in the interview . If someone ask!

2

Answers


  1. 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 use plugins if it wants to. It will still be qualified as a package.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search