Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bynicodevelop opened this issue Jan 26, 2023 · 18 comments
Assignees

Comments

@bynicodevelop
Copy link

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

@bynicodevelop bynicodevelop changed the title [Bug] [Bug] Error: The non-abstract class '_AppFlowyInputState' is missing implementations Jan 26, 2023
@appflowy
Copy link
Contributor

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

@annieappflowy
Copy link
Collaborator

Is this resolved? @bynicodevelop

@Merrit
Copy link
Contributor

Merrit commented Feb 3, 2023

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

@lovespreader
Copy link

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!)

@annieappflowy
Copy link
Collaborator

Is this resolved? @bynicodevelop

@8thgencore
Copy link

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

@saru2020
Copy link

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

@LucasXu0
Copy link
Collaborator

Flutter with 3.3.10 should not contain those APIs.

Screenshot 2023-02-22 at 09 46 17

@tyjak
Copy link

tyjak commented 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 ?

@Dieterbe
Copy link

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

@borracho-mejor
Copy link

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!

@leeyaal
Copy link

leeyaal commented Mar 19, 2023

Same error, any solutions?

@LucasXu0
Copy link
Collaborator

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

@leeyaal
Copy link

leeyaal commented Mar 20, 2023

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

How to clone flutter of 3.7.5 version correctly?

@LucasXu0
Copy link
Collaborator

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

@leeyaal
Copy link

leeyaal commented 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?

@LucasXu0
Copy link
Collaborator

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

@leeyaal
Copy link

leeyaal commented Mar 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests