问题
How to use local flutter package in another flutter application?
I created a package using following command:
flutter create --template=package my_new_package
and then in my application source code => main.dart
import "package:my_new_package/my_new_package.dart" // can not find the package
回答1:
locate this file in your flutter application => pubspec.yaml
make local dependency
dependencies:
flutter:
sdk: flutter
my_new_package:
path: ./my_new_package
来源:https://stackoverflow.com/questions/51238420/how-to-use-local-flutter-package-in-another-flutter-application