After upgrading to Flutter 3.1.x, the package flutter_pinput
doesn't work anymore. Any suggestions would be helpful. It was working fine in flutter 2.x.x. I have tried repairing the cache using flutter pub cache repair
and also cleaned the project cache using flutter clean
.It still doesn't work.
/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'.
- '_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').
Try correcting the name to the name of an existing method, or defining a method named 'FocusTrapArea'.
child: FocusTrapArea(
^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'D:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 27s
Running Gradle task 'assembleDebug'... 29.0s
Exception: Gradle task assembleDebug failed with exit code 1
Version Info:
Flutter 3.1.0-0.0.pre.2085 • channel master • https://github.com/flutter/flutter.git
Framework • revision 74aef9ff87 (8 hours ago) • 2022-08-04 02:00:08 -0400
Engine • revision e32e0d217b
Tools • Dart 2.19.0 (build 2.19.0-62.0.dev) • DevTools 2.16.0