D
Flutter CoreBeginner10 XP2 min read

What is the difference between a Flutter package and a plugin?

TL;DR: A Flutter package is pure Dart code; a plugin is a package that also contains native platform code (Kotlin/Java for Android, Swift/ObjC for iOS) and uses platform channels to bridge Dart and native functionality.

Full Answer

AspectPackagePlugin
CodePure Dart onlyDart + Native (Android/iOS)
Examplehttp, intl, json_serializablecamera, geolocator, bluetooth
Platform bridgeNot neededUses MethodChannel/EventChannel
SetupAdd to pubspec.yaml, importMay require iOS/Android config

Interview Tip

💡

On pub.dev, a plugin is indicated by the platform support badges (Android, iOS, Web, etc.). Federated plugins split into an interface package, a platform implementation, and an app-facing package.

#packages#plugins#pub.dev#native