I created a flutter plugin by Android Studio 4.0 which name is printer.
We can get a tip at the pubspec.yaml:
printer:
# When depending on this package from a real application you should use:
# printer: ^x.y.z
# See https://dart.dev/tools/pub/dependencies#version-constraints
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
Then I use printer locally in another flutter project:
printer:
path: ../printer/
After pub get I found printer added in .flutter-plugins & .flutter-plugins-dependencies automatically.