how to use local flutter package in another flutter application?

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


locate this file in your flutter application => pubspec.yaml

make local dependency

dependencies:
flutter:
sdk: flutter
my_new_package:
path: ./my_new_package

Comments

Popular posts from this blog

flutter websocket connection issue

React-native : Unable to use react-native-fast-image

reinterpret_cast bug or UB? [duplicate]