我在 Flutter 项目中使用 ar_flutter_plugin_flutterflow 包时遇到问题。我按照安装说明进行操作,并使用正确的软件包版本更新了我的 pubspec.yaml:
flutter:
sdk: flutter
cupertino_icons: ^1.0.6
ar_flutter_plugin_flutterflow: ^0.7.47
vector_math: ^2.1.0 ```
I imported the package in my main.dart file using:
```import 'package:ar_flutter_plugin_flutterflow/ar_flutter_plugin.dart';```
However, I’m encountering issues with class names and methods not being recognized. Specifically:
Class Names and Methods: The classes and methods I’m using are not recognized by the Flutter editor. For example, I’ve used:
ArSessionManager (I expected ArCoreController or similar)
ArView (I expected ArCoreView or similar)
Methods like addArNode() do not seem to exist.
[here is a screenshot](https://i.sstatic.net/JVcBJ2C9.png)
Question:
Are there updates or changes to the classes and methods in ar_flutter_plugin_flutterflow that differ from the original ar_flutter_plugin? How can I adapt my code to match the updated API, or is there another approach I should take to resolve these issues?
Thanks in advance for your help!
Added the correct package dependency in pubspec.yaml.
Ran flutter pub get and restarted the environment.
您可以在此处找到在 FlutterFlow 上运行的完整示例:https://app.flutterflow.io/project/a-r-flutter-lib-ipqw3k