我正在尝试创建一个颤振包。
在 Lib(package) 文件夹中,我有MY-PACKAGE.dart
文件。我还有一个名为的文件夹src
,其中包含一些我将导入以用于MY-PACKAGE.dart
.
在我pubspec.yaml
的中,Example folder
我添加了如下所示的包并运行包获取。
onboardly:
path: ../
要使用我的包,我这样做
// THERE IS NOT ANY PROBLEM WITH THIS IMPORT STATEMENT
import 'package:onboardly/onboardly.dart';
OnBoardly( // THIS CLASS WORKS FINE
screens: [
OnBoardlyScreenItem( // THIS CLASS CAN NOT BE FOUND EVEN THO IT EXISTS IN THE src FOLDER
image: Image.asset("assets/loadicon.png"),
description: Text("Hello There"),
),
],
),
我面临的问题是 无法找到包中OnBoardlyScreenItem()
的内容。src
我跑
flutter packages get
flutter pub get
restarted my IDE
了flutter clean