-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Use case
Windows APIs come in a variety of flavors, most notably:
- Simple C-based APIs like
MessageBox - COM-based APIs like
IDesktopWallpaper - WinRT APIs like
Windows.Storage.ApplicationData
In Flutter, we use all three types of API in various ways, not least through plugins such as path_provider_windows. That will only increase with the experimental work on the UWP runner, and the potential of moving some code from C++ or PowerShell to Dart.
The win32 package provides a convenient low-level Dart projection of selected Windows APIs. It includes a code generator, as well as the resultant Dart library and about 1,500 unit tests. The package is loosely endorsed by Microsoft as a community project. It in turn relies through a dev dependency on a separate winmd package that can consume Windows metadata.
Both packages are maintained by @timsneath and are BSD-licensed.
Proposal
It does seem a little bit of an odd situation that all this code built on top of it is officially sanctioned, but not that package itself. While version pinning helps a little, it is worth considering whether we should bring win32 (at least) into the fold as an official package of the Flutter team to minimize risk.
The specifics of this are undefined here, but might include moving the package into the flutter/plugins repo, applying a more rigorous code review, or using build infra that tests it as part of a regular Flutter Windows build.