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

The non-abstract class 'InputConnectionController' is missing implementations for these members: - TextInputClient.currentTextEditingValue #222

Open
masewo opened this issue Dec 21, 2019 · 20 comments

Comments

@masewo
Copy link

masewo commented Dec 21, 2019

Steps to Reproduce

Building of my application not possible anymore while using zefyr 0.8.0 and flutter channel master (v1.13.3-pre.60) because of InputConnectionController not implementing currentTextEditingValue.

Fixed by implementing currentTextEditingValue in InputConnectionController:

masewo@2e37998

@xalabax
Copy link

xalabax commented Dec 26, 2019

Yes, it works for me. Thanks @masewo

zefyr:
git:
url: git://github.com/masewo/zefyr.git
path: packages/zefyr/
commit: 2e37998

@zakiso
Copy link

zakiso commented Dec 31, 2019

same issue

@mattheuten
Copy link

This is still an issue in the most recent version! Maybe try implementing the fix and releasing a new version?

@pulyaevskiy
Copy link
Contributor

This keeps coming up with people using Flutter master or dev channels.

Note that Zefyr currently only supports stable versions of Flutter. Moreover published versions of this package will always target Flutter stable only.

We could potentially have some sort of -dev version published that covers changes from Flutter master but I’m not sure if it’s worth extra effort.

I’d like to have some sort of support for this scenario though. Current thinking is to make Zefyr master branch track Flutter master.

This has a downside of tying Zefyr release cycle to Flutter and forcing users of stable channel to switch to master to get latest fixes.

Note that if we use this strategy there will be no pub releases for changes in master so people using this version will have to use git repo dependency in their pubspec.

This is somewhat similar to discussion in #205 and @TimWhiting suggestion.

@sgehrman
Copy link

same issue.

@winwisely99
Copy link

winwisely99 commented Feb 25, 2020

I am running on the MASTER channel of Flutter.

Screenshot 2020-02-25 at 06 45 51

The code changes i made:

master...winwisely99:master

What does not work:

  • in Flutter Web, when going into edit mode you can type. In mobile and desktop it works fine.

Then i tried running on the STABLE channel.

But it was impossible to run Flutter web.

flutter config --enable-web
Setting "enable-web" value to "true".

You may need to restart any open editors for them to read new settings.
cd /Users/apple/workspace/go/src/github.com/winwisely99/zefyr/packages/zefyr/example && flutter run -d chrome
No devices found with name or id matching 'chrome'

You need to be on BETA channel in order to run Flutter Web:
https://flutter.dev/docs/get-started/web#set-up


So, then i tried running on the BETA channel.

Everything worked pretty much !!

Screenshot 2020-02-25 at 07 25 25

SO, i was wondering if we can flip over to flutter beta channel so that we can get Flutter Web nice and stable ?

@winwisely99
Copy link

DEV channel works better actually.

@marcinOz
Copy link

marcinOz commented Mar 2, 2020

Hi @winwisely99, what version of the flutter are you using as I checked on beta and dev, and on both without luck. With error:

Launching lib/main.dart on Chrome in debug mode...
Building application for the web...
Error creating leader|lib/main.ddc.dill
Error creating kernel summary for module:leader|lib/main.ddc.dill

Response:--dart-sdk-summary=file:///Users/StudioProjects/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk.dill
...
Error compiling dartdevc module:zefyr|lib/src/widgets/buttons.ddc.js

packages/zefyr/src/widgets/input.dart:11:7: Error: The non-abstract class 'InputConnectionController' is missing implementations for these members:
 - TextInputClient.currentTextEditingValue
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 InputConnectionController implements TextInputClient {
      ^^^^^^^^^^^^^^^^^^^^^^^^^
packages/flutter/src/services/text_input.dart: Context: 'TextInputClient.currentTextEditingValue' is defined here.


Failed after 306ms
Finished with error: Failed to build application for the Web.

My version is:

Flutter 1.15.3 • channel dev • https://github.com/flutter/flutter.git
Framework • revision 67826bdce5 (3 weeks ago) • 2020-02-10 14:59:32 -0800
Engine • revision 6158f03ef5
Tools • Dart 2.8.0 (build 2.8.0-dev.8.0 514a8d4c84)

and

Flutter 1.14.6 • channel beta • https://github.com/flutter/flutter.git
Framework • revision fabeb2a16f (5 weeks ago) • 2020-01-28 07:56:51 -0800
Engine • revision c4229bfbba
Tools • Dart 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)

@winwisely99
Copy link

Using beta.

I forked it: github.com/winwisely99/zefyr.git

Just a slight change to make it work.

@marcinOz
Copy link

marcinOz commented Mar 3, 2020

It works! Thank you @winwisely99 🙇

@rahul-dutt-sharma
Copy link

Anyone got this to work on macos target?

@TimWhiting
Copy link

@pulyaevskiy

Just some more ideas on the flutter channels and this package versioning

This keeps coming up with people using Flutter master or dev channels.

Note that Zefyr currently only supports stable versions of Flutter. Moreover published versions of this package will always target Flutter stable only.

We could potentially have some sort of -dev version published that covers changes from Flutter master but I’m not sure if it’s worth extra effort.

I’d like to have some sort of support for this scenario though. Current thinking is to make Zefyr master branch track Flutter master.

This has a downside of tying Zefyr release cycle to Flutter and forcing users of stable channel to switch to master to get latest fixes.

They wouldn't necessarily have to switch to master for latest fixes. They might be able to switch to a flutter beta or dev channel release that Zefyr master is compatible with.

I think Zefyr has greater problems with the flutter versioning issue than other libraries because it is tied closely to the implementation of flutter's text field etc. Hopefully after the refactors to enable web and desktop there shouldn't be as many breaking changes as far as the text field's api in flutter.

It might just require some documentation in Zefyr master's CHANGELOG.md on which flutter version/s the Zefyr version is compatible / tested with. You could also specify the flutter version requirements in the pubspec.yaml's environment field. The latter solution would enforce the flutter version requirements and be a possible explanation to the users of the package rather than having duplicate issues for the same reason because of breaking changes in flutter master.

Note that if we use this strategy there will be no pub releases for changes in master so people using this version will have to use git repo dependency in their pubspec.

Or if Zefyr master tracks Flutter master than you could publish -dev versions as suggested. It seems like that is what the pub package publishing guidelines recommends for packages that depend on flutter versions:

@zeusbaba
Copy link

thanks @winwisely99 🥇
this works on mobile with flutter channel beta

zefyr:
    git:
      url: git://github.com/winwisely99/zefyr.git
      path: packages/zefyr/
      commit: 9b032d8

harajune added a commit to harajune/zefyr that referenced this issue May 10, 2020
@softmarshmallow
Copy link

softmarshmallow commented May 25, 2020

thanks @winwisely99 🥇
this works on mobile with flutter channel beta

zefyr:
    git:
      url: git://github.com/winwisely99/zefyr.git
      path: packages/zefyr/
      commit: 9b032d8

@zeusbaba
this no works with dev channel

[✓] Flutter (Channel dev, 1.19.0-1.0.pre, on Mac OS X 10.15.3 19D76, locale en-KR)
    • Flutter version 1.19.0-1.0.pre at /Users/Genoplan/development/flutter
    • Framework revision 456d80b9dd (13 days ago), 2020-05-11 11:45:03 -0400
    • Engine revision d96f962ca2
    • Dart version 2.9.0 (build 2.9.0-7.0.dev 092ed38a87)

@zeusbaba
Copy link

thanks @winwisely99 🥇
this works on mobile with flutter channel beta

zefyr:
    git:
      url: git://github.com/winwisely99/zefyr.git
      path: packages/zefyr/
      commit: 9b032d8

@zeusbaba
this no works with dev channel

[✓] Flutter (Channel dev, 1.19.0-1.0.pre, on Mac OS X 10.15.3 19D76, locale en-KR)
    • Flutter version 1.19.0-1.0.pre at /Users/Genoplan/development/flutter
    • Framework revision 456d80b9dd (13 days ago), 2020-05-11 11:45:03 -0400
    • Engine revision d96f962ca2
    • Dart version 2.9.0 (build 2.9.0-7.0.dev 092ed38a87)

I tested it with channel beta but yours seems to be channel dev that i dunno.
NB! after latest flutter upgrade, this works also with channel stable

@boinxi
Copy link

boinxi commented Aug 30, 2020

Is there a more recent solution for running zefyr on flutter web right now?
I'm getting an error using :

  zefyr:
    git:
      url: git://github.com/winwisely99/zefyr.git
      path: packages/zefyr/
      commit: 9b032d8

This is the error:

../../../flutter/.pub-cache/git/zefyr-220e2d453df6bc7d7a1d7d89788c0985645db092/packages/zefyr/lib/src/widgets/selection.dart:594:42: Error: Too few positional arguments: 7 required, 6 given.
    final toolbar = controls.buildToolbar(
                                         ^
Failed to compile application.

@pulyaevskiy
Copy link
Contributor

If you're using Flutter's master channel you can try switching to the master branch in this repo instead of using a fork.

That said, I haven't tested Zefyr on the web platform and it is likely to lack some features. The good news is I'm looking into issues with desktop support right now, so this should address the web platform as well.

@shujaatak
Copy link

shujaatak commented Sep 3, 2020

The good news is I'm looking into issues with desktop support right now, so this should address the web platform as well.

Awesome!

@shujaatak
Copy link

@pulyaevskiy For image picking for web there is plugin: image_picker_for_web, check the online web demo: https://dit-picker-tests.web.app/

@momilc
Copy link

momilc commented Oct 2, 2020

on channel dev I've just copy and paste the lib folder available on github '/packages/zefyr/lib' and paste it in pub.dartlang.org/zefyr-0.10.0 to override the lib folder. I works just fine.

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