flutter_quill:^7.4.6错误:没有名为“onLiveTextInput”的命名参数

2ul0zpep  于 2023-11-21  发布在  Flutter
关注(0)|答案(2)|浏览(130)

我想在Flutter应用中使用flutter_quill:^7.4.6
这是我的家庭作业描述小部件:


的数据
我在表单小部件中这样调用这个小部件:



但是当我运行项目时,它会给出给予这个错误:

: Error: No named parameter with the name 'onLiveTextInput'.
raw_editor.dart:353
      onLiveTextInput: null,
      ^^^^^^^^^^^^^^^
/C:/FlutterDev/flutter/packages/flutter/lib/src/widgets/editable_text.dart:1832:38: Context: Found this candidate, but the arguments don't match.
  static List<ContextMenuButtonItem> getEditableButtonItems({`

字符串
这是控制台内部的完整错误代码:

Launching lib\main.dart on sdk gphone x86 in debug mode...
: Error: No named parameter with the name 'onLiveTextInput'.
      onLiveTextInput: null,
      ^^^^^^^^^^^^^^^
/C:/FlutterDev/flutter/packages/flutter/lib/src/widgets/editable_text.dart:1832:38: Context: Found this candidate, but the arguments don't match.
  static List<ContextMenuButtonItem> getEditableButtonItems({

                                     ^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:
Script 'C:\FlutterDev\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\FlutterDev\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 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)


我试图在一个单独的脚手架小部件中添加此功能,但它不起作用。

b0zn9rqh

b0zn9rqh1#

根据我从那里的讨论中了解到的,您需要将flutter_quill降级到7.2.0或7.3.0,或者将Flutter升级到3.13或更高版本。

5tmbdcev

5tmbdcev2#

打开文件,共享此代码

相关问题