错误:位置参数太多:允许 1 个,但找到 2 个。尝试删除额外的位置参数。super.addToScene(构建器,layerOffset);

Dav*_*ria 11 dart flutter

从 2.5 升级到 flutter 2.8 后出现此错误,运行 flutter clean 但无法解决
\n../../flutter/.pub-cache/hosted/pub.dartlang.org/visibility_ detector-0.2.0/lib /src/visibility_detector_layer.dart:276:21: 错误:位置参数太多:允许 1 个,但找到 2 个。\n尝试删除多余的位置参数。\nsuper.addToScene(builder, layerOffset);\nflutter doctor

\n
Doctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel stable, 2.8.1, on macOS 11.5.2 20G95 darwin-arm, locale en-KE)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 31.0.0)\n[!] Xcode - develop for iOS and macOS (Xcode 13.2)\n\xe2\x9c\x97 CocoaPods installed but not working.\n    You appear to have CocoaPods installed but it is not working.\n    This can happen if the version of Ruby that CocoaPods was installed with is   different from the one\n    being used to invoke it.\n    This can usually be fixed by re-installing CocoaPods.\n  To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for\n  instructions.\n[\xe2\x9c\x97] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google\nChrome.app/Contents/MacOS/Google Chrome)\n! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.\n[!] Android Studio\n\xe2\x9c\x97 Unable to find bundled Java version.\n[\xe2\x9c\x93] IntelliJ IDEA Community Edition (version 2021.3)\n[\xe2\x9c\x93] VS Code (version 1.63.0)\n [\xe2\x9c\x93] Connected device (1 available)\n! Doctor found issues in 3 categories.\n
Run Code Online (Sandbox Code Playgroud)\n

颤动版本

\n
Flutter 2.8.1 \xe2\x80\xa2 channel stable \xe2\x80\xa2 https://github.com/flutter/flutter.git\nFramework \xe2\x80\xa2 revision 77d935af4d (2 days ago) \xe2\x80\xa2 2021-12-16 08:37:33 -0800\nEngine \xe2\x80\xa2 revision 890a5fca2e\nTools \xe2\x80\xa2 Dart 2.15.1\n
Run Code Online (Sandbox Code Playgroud)\n

代码在 2.5 上运行得很好,直到升级

\n

Kni*_*rce 10

使用visibility_ detector 0.2.2。