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

问题描述 投票:0回答:1

我想在我的 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)

我尝试将其添加到单独的脚手架小部件中,但它不起作用

flutter rich-text-editor
1个回答
0
投票

此处描述了相同的问题:https://github.com/singerdmx/flutter-quill/issues/1384

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

© www.soinside.com 2019 - 2024. All rights reserved.