flutter_pinput: FocusTapArea не определен

После обновления до Flutter 3.1.x пакетflutter_pinputбольше не работает. Любые предложения будут полезны. Он отлично работал во флаттере 2.xx. Я попытался восстановить кеш, используяflutter pub cache repairа также почистил кеш проекта с помощьюflutter clean.Это все еще не работает.

       /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

Информация о версии:

      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

1 ответ

вашего пакетаОбновите вывод

После обновления пакета снова запустите приложение.

Другие вопросы по тегам