zefyr icon indicating copy to clipboard operation
zefyr copied to clipboard

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

Open masewo opened this issue 5 years ago • 20 comments

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:

https://github.com/masewo/zefyr/commit/2e379982e97cc9b5aeb4fc0fcd85d6d32833f4ea

masewo avatar Dec 21 '19 12:12 masewo

Yes, it works for me. Thanks @masewo

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

xalabax avatar Dec 26 '19 16:12 xalabax

same issue

zakiso avatar Dec 31 '19 13:12 zakiso

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

mattheuten avatar Jan 14 '20 15:01 mattheuten

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.

pulyaevskiy avatar Jan 14 '20 18:01 pulyaevskiy

same issue.

sgehrman avatar Jan 22 '20 02:01 sgehrman

I am running on the MASTER channel of Flutter.

Screenshot 2020-02-25 at 06 45 51

The code changes i made:

https://github.com/memspace/zefyr/compare/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 avatar Feb 25 '20 05:02 winwisely99

DEV channel works better actually.

winwisely99 avatar Feb 26 '20 15:02 winwisely99

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)

marcinOz avatar Mar 02 '20 21:03 marcinOz

Using beta.

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

Just a slight change to make it work.

winwisely99 avatar Mar 02 '20 23:03 winwisely99

It works! Thank you @winwisely99 🙇

marcinOz avatar Mar 03 '20 19:03 marcinOz

Anyone got this to work on macos target?

rahul-dutt-sharma avatar Mar 12 '20 15:03 rahul-dutt-sharma

@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:

TimWhiting avatar Mar 20 '20 02:03 TimWhiting

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 avatar Apr 13 '20 09:04 zeusbaba

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)

softmarshmallow avatar May 25 '20 01:05 softmarshmallow

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

zeusbaba avatar May 25 '20 06:05 zeusbaba

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.

boinxi avatar Aug 30 '20 09:08 boinxi

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.

pulyaevskiy avatar Aug 30 '20 17:08 pulyaevskiy

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 avatar Sep 03 '20 14:09 shujaatak

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

shujaatak avatar Sep 03 '20 14:09 shujaatak

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.

momilc avatar Oct 02 '20 14:10 momilc