小编Rud*_*kur的帖子

flutter_pinput:FocusTapArea 未定义

升级到 Flutter 3.1.x 后,该包flutter_pinput不再工作。任何的意见都将会有帮助。它在 flutter 2.xx 中工作正常,我尝试使用修复缓存flutter pub cache repair,并使用清理项目缓存flutter clean。它仍然不起作用。

\n
 /C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/pinput-2.2.11/lib/src/pinput_state.dart:334:14: Error: The method 'FocusTrapArea' isn't defined for the class '_PinputState'.\n         - '_PinputState' is from 'package:pinput/src/pinput.dart' ('/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/pinput-2.2.11/lib/src/pinput.dart').\n        Try correcting the name to the name of an existing method, or defining a method named 'FocusTrapArea'.\n              child: FocusTrapArea(\n                     ^^^^^^^^^^^^^\n        \n        \n        FAILURE: Build failed with an exception.\n        \n        * Where:\n        Script 'D:\\flutter\\packages\\flutter_tools\\gradle\\flutter.gradle' line: 1159\n        \n        * What went wrong:\n        Execution failed for task ':app:compileFlutterBuildDebug'.\n …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-dependencies flutter-packages flutter-pub

5
推荐指数
1
解决办法
2089
查看次数