Skip to content

RawEditorState missing TextInputClient.onFocusReceived (Flutter 3.44.0-0.1.pre beta) #579

Description

@tusharbhambere

Steps to Reproduce

  1. Switch to Flutter beta channel:

    flutter channel beta
    flutter upgrade
  2. Use Flutter version 3.44.0-0.1.pre

  3. Add dependency:

    fleather: 1.26.0
  4. Run the project (flutter run or build)


Environment

  • OS: macOS (also reproducible on Android, iOS, Web)
  • Flutter version: 3.44.0-0.1.pre (beta channel)
  • Fleather version: 1.26.0

Logs

../../../../../.puro/shared/pub_cache/hosted/pub.dev/fleather-1.26.0/lib/src/widgets/editor.dart:921:7: Error: The non-abstract class 'RawEditorState' is missing implementations for these members:
 - TextInputClient.onFocusReceived

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 RawEditorState extends EditorState
      ^^^^^^^^^^^^^^

../../../../../.puro/envs/beta/flutter/packages/flutter/lib/src/services/text_input.dart:1401:8: Context: 'TextInputClient.onFocusReceived' is defined here.
  bool onFocusReceived() => false;
       ^^^^^^^^^^^^^^^

Additional Context

Flutter beta (3.44.0-0.1.pre) introduced a new method onFocusReceived() in TextInputClient, which is not implemented in RawEditorState.

Suggested Fix

Add the following method inside RawEditorState:

@override
bool onFocusReceived() {
  return false;
}

Alternatively, update related mixins (e.g. RawEditorStateTextInputClientMixin) to include this method for better forward compatibility.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions