Flutter-desktop-embedding: [windows] Add plugin support

Created on 12 Jul 2018  路  15Comments  路  Source: google/flutter-desktop-embedding

The current implementation has no plugin support. I expect that we'll be able to share most or all of the Linux code for the plugin infrastructure (although if Windows provides a built-in JSON parser, we'll presumably want to use that instead of jsoncpp).

If we can't use the same code, then the Windows version should not follow the macOS/Linux example, since I plan to rewrite both per #102. Instead it should be written directly to the end-state of the macOS/Linux refactoring (which would mean something very much like the Flutter Android implementation).

Most helpful comment

FWIW I鈥檝e been making some progress on this now actively debugging a windows implementation

All 15 comments

@clarkezone I know you've expressed interest in tackling this after the core implementation is complete.

yes i can look at those. Whats the ETA on the refactoring of the linux / mac versions

The second phase (adding MethodCodec) I'm working on now and will probably finish on Monday. I'm not sure when I'll get to the third and final phase (adding MethodChannel, and potentially eliminating the plugin class entirely).

OK. I can probably get to text input over the weekend

Windows has a Windows.Data.Json API that should do the trick. But i鈥檒l wait for your part to come in.

Got a chance to look at this today and notice that text input depends on the plugin infra which I didn't previously realize. For that reason I think i'll await your refactor for that as well as the more general plugin support. Also, for text input I think it would be better to use the binary format rather than json for perf reasons, do you agree?

Also, for text input I think it would be better to use the binary format rather than json

You have to use JSON; both sides have to match:
https://github.com/flutter/flutter/blob/fa6f9a03416ecf5e0e1813861538116b813dce66/packages/flutter/lib/src/services/system_channels.dart#L146

That's why JSON, not Standard, is the one codec currently implemented for desktop so far

@stuartmorgan @clarkezone any news?

There's no concrete ETA on the remaining refactor step I referred to above. However, my hope is that the Windows implementation of the plugin infrastructure can share a lot of code with the Linux version (with just the JSON-specific implementations being different), so implementing it before the last of the refactor shouldn't be an issue.

The blocker at this point is someone having time to implement it.

@listepo-alterpost hoping to spend some time looking at this week of Oct18th.

FWIW I鈥檝e been making some progress on this now actively debugging a windows implementation

Happy New Year for Windows, thanks to James :)

Happy new years everyone! Thx for all your hard work and awesome news on Windows!

Is text input supported? I cannot key anything or copy-paste to TextField, or If there is a plugin supported this feature?

By the way, I'm using Traditional Chinese, and my OS is Win 1903 18362.239.

Log:
flutter: Another exception was thrown: FormatException: Bad UTF-8 encoding 0xba (at offset 223)

Copy/paste support is https://github.com/flutter/flutter/issues/30708, and non-ASCII input is https://github.com/flutter/flutter/issues/30661. Both are unrelated to this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vanlooverenkoen picture vanlooverenkoen  路  3Comments

YazeedAlKhalaf picture YazeedAlKhalaf  路  5Comments

pauldemarco picture pauldemarco  路  6Comments

Kiruel picture Kiruel  路  3Comments

krisu7 picture krisu7  路  5Comments