-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/plugins
#3485Labels
p: path_providerPlugin that provides resolved paths to some platform directoriesPlugin that provides resolved paths to some platform directoriesplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
Description
The win32 package has a minor breaking change between 2.0.0-nullsafety.8 and 2.0.0-nullsafety.9. The Windows implementation of path_provider_windows needs to be updated to take account of this change.
Details (for those who care)
As the Dart FFI API stabilizes, the new guidance is to pass around Pointer<STRUCT_NAME>, rather than Pointer<STRUCT_NAME>.ref if you need access to the native backing store. In the win32 package, which has functions that make it easier to access various struct members, the initial plan was to use extension methods on Pointer to provide those functions, but that creates inconsistency between helper functions and the struct members themselves. @dcharkes helped me find a better way of doing this.
So in code, instead of something like:
final guid = calloc<GUID>()..setGUID(IID_IDispatch);you write:
final guid = calloc<GUID>()..ref.setGUID(IID_IDispatch);Metadata
Metadata
Assignees
Labels
p: path_providerPlugin that provides resolved paths to some platform directoriesPlugin that provides resolved paths to some platform directoriesplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically