Upgrading win32 1 to 2
Breaking1.7.4+1 → 2.7.0Breaking11Platform3New61Changed17Fixed7Other25
BreakingUpgrade verdict
11 breaking changes and 3 platform requirement changes.
In plain terms
- If you import library files directly by path, update the file names to lower case.
- The Windows Metadata classes have moved to a separate package called winmd. Most apps are unaffected because these classes are only used for code generation.
- Code that uses the Windows Runtime (WinRT) APIs may need updates, but other APIs are unaffected. The calendar API is now complete and serves as the model for other WinRT APIs.
- Some registry functions now take unsigned 32-bit integers instead of signed ones, so code passing Int32 values may need updating.
Must act Top 5 of 14 that need code or config changes
Dart SDK requirement changed in 2.6.0: >=2.7.0 <3.0.0 → >=2.17.0 <3.0.0.
What you must change
Breaking11
Renames all files to lower case, for example IUnknown.dart becomes iunknown.dart.
IUnknown.dartiunknown.dartRemoves Windows Metadata classes, which now live in the winmd package.
Reworks Windows Runtime APIs to be more idiomatic for Dart, with breaking changes limited to WinRT APIs and a full Windows.Globalization.Calendar implementation.
Windows.Globalization.CalendarUpgrades to the latest Windows metadata, changing some registry-related API signatures from Int32 to Uint32.
Uses an automatic code generator for most structs, changing BLUETOOTH_ADDRESS.rgBytes from List<int> to Array<Uint8>.
BLUETOOTH_ADDRESS.rgBytesArray<Uint8>List<int>Rewrites complex structs to use the Dart 2.14 Union FFI type, raising the minimum Dart version and nesting INPUT mi/ki/hi fields.
UnionINPUTmikihiFixes convertToHString to return an int, since HSTRINGs are handles, breaking apps that use WinRT APIs.
convertToHStringHSTRINGStable release with sound null safety, requiring null-safe Dart code.
Updates to ffi 1.0.0 and addresses its breaking changes.
ffiReworks the API wrapper to use functions instead of properties.
Uses new projection tooling for WinRT classes, which remain experimental and may change as the tools mature.
StringDateTimeIVectorViewPlatform3
Updates the minimum Dart version to 2.15.0 and uses constructor tearoffs.
Upgrades to Dart 2.13, which supports packed structs and arrays in FFI.
Lowers the minimum Dart SDK requirement to 3.10.