[GH-ISSUE #1741] [Bug] Error: The non-abstract class '_AppFlowyInputState' is missing implementations #669

Closed
opened 2026-03-23 20:39:28 +00:00 by mirror · 18 comments
Owner

Originally created by @bynicodevelop on GitHub (Jan 26, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1741

Originally assigned to: @LucasXu0, @appflowy on GitHub.

Bug Description

I am currently testing your editor.

However, upon starting, I am encountering several errors on both MacOS and the web.

How to Reproduce

Here is the code that I have produced:

version: 1.0.0+1

environment:
  sdk: ">=2.19.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  appflowy_editor: ^0.0.9
import "package:appflowy_editor/appflowy_editor.dart";
import "package:flutter/material.dart";

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      localizationsDelegates: const [
        AppFlowyEditorLocalizations.delegate,
      ],
      home: const HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  const HomeScreen({super.key});

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  final EditorState editorState = EditorState.empty();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Padding(
        padding: EdgeInsets.symmetric(
          horizontal: MediaQuery.of(context).size.width * 0.25,
        ),
        child: Column(
          children: [
            AppFlowyEditor(
              editorState: editorState,
            )
          ],
        ),
      ),
    );
  }
}
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-x64, locale fr-FR)
    ! Warning: `dart` on your path resolves to
      /usr/local/Cellar/dart/2.18.0/libexec/bin/dart, which is not inside your current
      Flutter SDK checkout at /Users/nickleus/development/flutter. Consider adding
      /Users/nickleus/development/flutter/bin to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more
      details.
[] Xcode - develop for iOS and macOS (Xcode 14.2)
[] Chrome - develop for the web
[] Android Studio (version 2021.2)
[] Android Studio (version 2021.3)
[] VS Code (version 1.74.3)
[] Connected device (2 available)
[] HTTP Host Availability

! Doctor found issues in 2 categories.

Expected Behavior

The error is as follows:

Launching lib/main.dart on Chrome in debug mode...
lib/main.dart:1
: Error: The non-abstract class '_AppFlowyInputState' is missing implementations for these members:
../…/service/input_service.dart:60
 - TextInputClient.didChangeInputControl
 - TextInputClient.performSelector
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class _AppFlowyInputState extends State<AppFlowyInput>
      ^^^^^^^^^^^^^^^^^^^
: Context: 'TextInputClient.didChangeInputControl' is defined here.
../…/services/text_input.dart:1163
  void didChangeInputControl(TextInputControl? oldControl, TextInputControl? newControl) {}
       ^^^^^^^^^^^^^^^^^^^^^
: Context: 'TextInputClient.performSelector' is defined here.
../…/services/text_input.dart:1184
  void performSelector(String selectorName) {}

       ^^^^^^^^^^^^^^^
: Error: `@staticInterop` classes should not contain any generative constructors.
../…/lib/rich_clipboard_web.dart:122
Use factory constructors instead.
  external _ClipboardItem(dynamic args);
           ^
Failed to compile application.
Exited

Is this a problem with my setup or a known bug? I looked into the issues and I haven't found a similar case.

Operating System

MacOS

AppFlowy Version(s)

^0.0.9

Screenshots

No response

Additional Context

No response

Originally created by @bynicodevelop on GitHub (Jan 26, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1741 Originally assigned to: @LucasXu0, @appflowy on GitHub. ### Bug Description I am currently testing your editor. However, upon starting, I am encountering several errors on both MacOS and the web. ### How to Reproduce Here is the code that I have produced: ```yaml version: 1.0.0+1 environment: sdk: ">=2.19.0 <3.0.0" dependencies: flutter: sdk: flutter appflowy_editor: ^0.0.9 ``` ```dart import "package:appflowy_editor/appflowy_editor.dart"; import "package:flutter/material.dart"; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, localizationsDelegates: const [ AppFlowyEditorLocalizations.delegate, ], home: const HomeScreen(), ); } } class HomeScreen extends StatefulWidget { const HomeScreen({super.key}); @override State<HomeScreen> createState() => _HomeScreenState(); } class _HomeScreenState extends State<HomeScreen> { final EditorState editorState = EditorState.empty(); @override Widget build(BuildContext context) { return Scaffold( body: Padding( padding: EdgeInsets.symmetric( horizontal: MediaQuery.of(context).size.width * 0.25, ), child: Column( children: [ AppFlowyEditor( editorState: editorState, ) ], ), ), ); } } ``` ```bash Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-x64, locale fr-FR) ! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/2.18.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nickleus/development/flutter. Consider adding /Users/nickleus/development/flutter/bin to the front of your path. [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.74.3) [✓] Connected device (2 available) [✓] HTTP Host Availability ! Doctor found issues in 2 categories. ``` ### Expected Behavior The error is as follows: ``` Launching lib/main.dart on Chrome in debug mode... lib/main.dart:1 : Error: The non-abstract class '_AppFlowyInputState' is missing implementations for these members: ../…/service/input_service.dart:60 - TextInputClient.didChangeInputControl - TextInputClient.performSelector Try to either - provide an implementation, - inherit an implementation from a superclass or mixin, - mark the class as abstract, or - provide a 'noSuchMethod' implementation. class _AppFlowyInputState extends State<AppFlowyInput> ^^^^^^^^^^^^^^^^^^^ : Context: 'TextInputClient.didChangeInputControl' is defined here. ../…/services/text_input.dart:1163 void didChangeInputControl(TextInputControl? oldControl, TextInputControl? newControl) {} ^^^^^^^^^^^^^^^^^^^^^ : Context: 'TextInputClient.performSelector' is defined here. ../…/services/text_input.dart:1184 void performSelector(String selectorName) {} ^^^^^^^^^^^^^^^ : Error: `@staticInterop` classes should not contain any generative constructors. ../…/lib/rich_clipboard_web.dart:122 Use factory constructors instead. external _ClipboardItem(dynamic args); ^ Failed to compile application. Exited ``` Is this a problem with my setup or a known bug? I looked into the issues and I haven't found a similar case. ### Operating System MacOS ### AppFlowy Version(s) ^0.0.9 ### Screenshots _No response_ ### Additional Context _No response_
Author
Owner

@appflowy commented on GitHub (Jan 26, 2023):

Hi @bynicodevelop You can try to downgrade flutter to 3.3.10 version.

<!-- gh-comment-id:1405198027 --> @appflowy commented on GitHub (Jan 26, 2023): Hi @bynicodevelop You can try to downgrade flutter to 3.3.10 version.
Author
Owner

@annieappflowy commented on GitHub (Jan 28, 2023):

Is this resolved? @bynicodevelop

<!-- gh-comment-id:1407352450 --> @annieappflowy commented on GitHub (Jan 28, 2023): Is this resolved? @bynicodevelop
Author
Owner

@Merrit commented on GitHub (Feb 3, 2023):

Can confirm that on Linux using Flutter 3.3.10 resolves this issue for me.

<!-- gh-comment-id:1416477101 --> @Merrit commented on GitHub (Feb 3, 2023): Can confirm that on Linux using Flutter 3.3.10 resolves this issue for me.
Author
Owner

@lovespreader commented on GitHub (Feb 10, 2023):

Hi @appflowy Is there any chance the Appflowy Editor package to be dependent on Flutter 3.7 anytime soon?

(Great work by the way, love this editor!)

<!-- gh-comment-id:1425250290 --> @lovespreader commented on GitHub (Feb 10, 2023): Hi @appflowy Is there any chance the Appflowy Editor package to be dependent on Flutter 3.7 anytime soon? (Great work by the way, love this editor!)
Author
Owner

@annieappflowy commented on GitHub (Feb 10, 2023):

Is this resolved? @bynicodevelop

<!-- gh-comment-id:1425592926 --> @annieappflowy commented on GitHub (Feb 10, 2023): Is this resolved? @bynicodevelop
Author
Owner

@8thgencore commented on GitHub (Feb 15, 2023):

I get the same error when I install via docker-compose

<!-- gh-comment-id:1431515796 --> @8thgencore commented on GitHub (Feb 15, 2023): I get the same error when I install via docker-compose
Author
Owner

@saru2020 commented on GitHub (Feb 20, 2023):

I'm facing the same error,
tried downgrading to v3.3.10 but still facing issues

<!-- gh-comment-id:1436700786 --> @saru2020 commented on GitHub (Feb 20, 2023): I'm facing the same error, tried downgrading to v3.3.10 but still facing issues
Author
Owner

@LucasXu0 commented on GitHub (Feb 22, 2023):

Flutter with 3.3.10 should not contain those APIs.

Screenshot 2023-02-22 at 09 46 17
<!-- gh-comment-id:1439321554 --> @LucasXu0 commented on GitHub (Feb 22, 2023): Flutter with 3.3.10 should not contain those APIs. <img width="1624" alt="Screenshot 2023-02-22 at 09 46 17" src="https://user-images.githubusercontent.com/11863087/220499691-0a27a11e-e4cc-4c3a-8601-88743eb17b83.png">
Author
Owner

@tyjak commented on GitHub (Feb 24, 2023):

I get the same error when I install via docker-compose

I tried with Flutter 3.3.10 same result...

I changed line 24 in Dockerfile :
RUN git clone https://github.com/flutter/flutter.git --branch 3.3.10 $HOME/.local/flutter

Is it the way to do it to change the version of flutter ?

<!-- gh-comment-id:1443384774 --> @tyjak commented on GitHub (Feb 24, 2023): I get the same error when I install via docker-compose I tried with Flutter 3.3.10 same result... I changed line 24 in Dockerfile : `RUN git clone https://github.com/flutter/flutter.git --branch 3.3.10 $HOME/.local/flutter` Is it the way to do it to change the version of flutter ?
Author
Owner

@Dieterbe commented on GitHub (Feb 27, 2023):

Is there a fix for this in the works? I have to use 3.7 for a different project.. thanks!

<!-- gh-comment-id:1445913015 --> @Dieterbe commented on GitHub (Feb 27, 2023): Is there a fix for this in the works? I have to use 3.7 for a different project.. thanks!
Author
Owner

@borracho-mejor commented on GitHub (Mar 16, 2023):

Same error here. Trying for the first time today, using the docker-compose instruction here: https://github.com/AppFlowy-IO/AppFlowy-Docs/blob/main/essential-documentation/install-appflowy/installation-methods/installing-with-docker.md

I changed line 24 in Dockerfile :
RUN git clone https://github.com/flutter/flutter.git --branch 3.3.10 $HOME/.local/flutter

I also tried this, and the same error occurred. Extremely interesting app!! I hope we can try it out soon!

<!-- gh-comment-id:1471159314 --> @borracho-mejor commented on GitHub (Mar 16, 2023): Same error here. Trying for the first time today, using the docker-compose instruction here: https://github.com/AppFlowy-IO/AppFlowy-Docs/blob/main/essential-documentation/install-appflowy/installation-methods/installing-with-docker.md > I changed line 24 in Dockerfile : > RUN git clone https://github.com/flutter/flutter.git --branch 3.3.10 $HOME/.local/flutter I also tried this, and the same error occurred. Extremely interesting app!! I hope we can try it out soon!
Author
Owner

@leeyaal commented on GitHub (Mar 19, 2023):

Same error, any solutions?

<!-- gh-comment-id:1475353586 --> @leeyaal commented on GitHub (Mar 19, 2023): Same error, any solutions?
Author
Owner

@LucasXu0 commented on GitHub (Mar 20, 2023):

Hey, All. We're migrating to Flutter 3.7.5. https://github.com/AppFlowy-IO/AppFlowy/pull/2000

<!-- gh-comment-id:1476246290 --> @LucasXu0 commented on GitHub (Mar 20, 2023): Hey, All. We're migrating to Flutter 3.7.5. https://github.com/AppFlowy-IO/AppFlowy/pull/2000
Author
Owner

@leeyaal commented on GitHub (Mar 20, 2023):

Hey, All. We're migrating to Flutter 3.7.5. #2000

How to clone flutter of 3.7.5 version correctly?

<!-- gh-comment-id:1476340521 --> @leeyaal commented on GitHub (Mar 20, 2023): > Hey, All. We're migrating to Flutter 3.7.5. #2000 How to clone flutter of 3.7.5 version correctly?
Author
Owner

@LucasXu0 commented on GitHub (Mar 21, 2023):

Here's an example. @leeyaal

# lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:29] C:130
$ pwd
/Users/lucas.xu/Desktop/flutter

# lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:30]
$ git checkout 3.3.10
<!-- gh-comment-id:1477157980 --> @LucasXu0 commented on GitHub (Mar 21, 2023): Here's an example. @leeyaal ``` # lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:29] C:130 $ pwd /Users/lucas.xu/Desktop/flutter # lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:30] $ git checkout 3.3.10 ```
Author
Owner

@leeyaal commented on GitHub (Mar 21, 2023):

Here's an example. @leeyaal

# lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:29] C:130
$ pwd
/Users/lucas.xu/Desktop/flutter

# lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:30]
$ git checkout 3.3.10

is it appropriate tu use
RUN git clone https://github.com/flutter/flutter.git --branch 3.7.5 $HOME/.local/flutter
in dockerfile?

<!-- gh-comment-id:1477400078 --> @leeyaal commented on GitHub (Mar 21, 2023): > Here's an example. @leeyaal > > ``` > # lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:29] C:130 > $ pwd > /Users/lucas.xu/Desktop/flutter > > # lucas.xu @ MacBook-Pro-6 in ~/Desktop/flutter on git:3.3.10 o [9:22:30] > $ git checkout 3.3.10 > ``` is it appropriate tu use RUN git clone https://github.com/flutter/flutter.git --branch 3.7.5 $HOME/.local/flutter in dockerfile?
Author
Owner

@LucasXu0 commented on GitHub (Mar 21, 2023):

Yes. However, the migration PR doesn't be merged yet. The main branch only runs successfully with Flutter 3.3.10.

<!-- gh-comment-id:1477403074 --> @LucasXu0 commented on GitHub (Mar 21, 2023): Yes. However, the migration PR doesn't be merged yet. The main branch only runs successfully with Flutter 3.3.10.
Author
Owner

@leeyaal commented on GitHub (Mar 21, 2023):

so we are waiting for migration? @LucasXu0
It does not work for me with 3.3.10

<!-- gh-comment-id:1477407782 --> @leeyaal commented on GitHub (Mar 21, 2023): > so we are waiting for migration? @LucasXu0 It does not work for me with 3.3.10
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#669
No description provided.