google / flutter-desktop-embedding

Experimental plugins for Flutter for Desktop
Apache License 2.0
7.1k stars 608 forks source link

[windows] Implement existing FDE plugins #105

Closed stuartmorgan closed 4 years ago

stuartmorgan commented 6 years ago

This is general bug to track adding Windows support to the existing plugins within this project. If any of them require significant discussion, we can split out individual bugs at the time someone decides to work on one of them.

The list (which I'll try to keep updated over time) is:

~This is obviously blocked on #103.~

axellebot commented 5 years ago

Hello,

I'm kind of lost between all these repositories.

FYI I'd like to add windows feature to the shared_preferences from https://github.com/google/flutter-desktop-embedding

stuartmorgan commented 5 years ago

This bug is specifically for implementing the plugins that currently live in this repository; retitling to make that clear.

But to answer your general questions:

Where should we add/update plugins for desktop ?

For the plugins that already live here, definitely here. None will live here in the long term, but while they are in this early experimental stage they will continue to be here.

For existing Flutter plugins in general (like flutter/plugins), in the slightly longer term they should be developed in that repository. For macOS, which is the furthest along, that could probably be started now. For Windows though, since the current plugin API is expected to completely change (right now it shares the Linux C++ API; I expect it to switch to C# later), that's probably premature; discussions about how to proceed with that are still in progress. In the short term, I think adding a Windows implementation of shared_preferences here, with the expectation that it would move to flutter/plugins later, would be reasonable.

Is there any template to create a plugin for windows or enhance a existing plugin ?

Not yet, see #357.

stuartmorgan commented 5 years ago

FYI I'd like to add windows feature to the shared_preferences from https://github.com/google/flutter-desktop-embedding

@axellebot If this is something you're still interested in, the road to doing so is now much more clearly paved. /plugins/flutter_plugins/ now exists to hold such implementations (with #434 tracking shared_preferences specifically), and /plugins/example_plugin would serve as a template.

axellebot commented 5 years ago

@stuartmorgan Thanks for all your answers, I'll dig into this later this summer.

aloisdeniel commented 5 years ago

For the Windows implementation, as soon as the C# plugin is ready, a lot could be taken from the Xamarin.Essentials implementations.

stuartmorgan commented 5 years ago

None of these plugins is particularly complex. I would strongly prefer not to have implementations that are based on third-party code, as that adds a lot of complexity to the licensing situation.

stuartmorgan commented 4 years ago

window_size will be done shortly. Implementing it turned up some missing plugin registrar functionality that was lost during the Win32 conversion, but once that's in place it'll be straightforward.

stuartmorgan commented 4 years ago

I suspect menubar is going to run into the same need for a system for delegating window messages to plugins that has come up with min/max window size and cursor handling.

stuartmorgan commented 4 years ago

With menubar landed and color_panel removed from the repository entirely, there's now a Windows implementation of all of the FDE plugins.

csells commented 4 years ago

wahoo!