flutterrich-text-editor

flutter_quill: ^7.4.6 Error: No named parameter with the name 'onLiveTextInput'


I want to use flutter_quill: ^7.4.6 for my Flutter app

This is my homework description widget:

Enter image description here

And I called this widget in my form widget like this:

Enter image description here

But when I run the project, it will give this error:

: 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({`

This is the full error code inside the console:

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)

I tried to add this in a separate Scaffold widget, but it is not working.


Solution

  • The same issue is described in Major bug on Android #1384.

    From what I understand from the discussion there, you need to either downgrade flutter_quill to 7.2.0 or 7.3.0 or you need to upgrade Flutter to 3.13 or higher.