diff --git a/packages/path_provider/path_provider_windows/CHANGELOG.md b/packages/path_provider/path_provider_windows/CHANGELOG.md index 6190c39457da..8d365319c32a 100644 --- a/packages/path_provider/path_provider_windows/CHANGELOG.md +++ b/packages/path_provider/path_provider_windows/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.0-nullsafety.3 + +* Bump ffi dependency to 1.0.0 +* Bump win32 dependency to 2.0.0-nullsafety.12 + ## 0.1.0-nullsafety.2 * Bump ffi dependency to 0.3.0-nullsafety.1 diff --git a/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart b/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart index c88e10a0f9b3..db2ad9da207c 100644 --- a/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart +++ b/packages/path_provider/path_provider_windows/lib/src/path_provider_windows_real.dart @@ -34,7 +34,7 @@ class VersionInfoQuerier { if (VerQueryValue(versionInfo, keyPath, valueAddress, length) == 0) { return null; } - return valueAddress.value.unpackString(length.value); + return valueAddress.value.toDartString(); } finally { calloc.free(keyPath); calloc.free(length); @@ -64,7 +64,7 @@ class PathProviderWindows extends PathProviderPlatform { final error = GetLastError(); throw WindowsException(error); } else { - path = buffer.unpackString(length); + path = buffer.toDartString(); // GetTempPath adds a trailing backslash, but SHGetKnownFolderPath does // not. Strip off trailing backslash for consistency with other methods @@ -132,7 +132,7 @@ class PathProviderWindows extends PathProviderPlatform { } } - final path = pathPtrPtr.value.unpackString(MAX_PATH); + final path = pathPtrPtr.value.toDartString(); return Future.value(path); } finally { calloc.free(pathPtrPtr); @@ -183,8 +183,8 @@ class PathProviderWindows extends PathProviderPlatform { // If there was no product name, use the executable name. if (productName == null) { - productName = path.basenameWithoutExtension( - moduleNameBuffer.unpackString(moduleNameLength)); + productName = + path.basenameWithoutExtension(moduleNameBuffer.toDartString()); } return companyName != null diff --git a/packages/path_provider/path_provider_windows/pubspec.yaml b/packages/path_provider/path_provider_windows/pubspec.yaml index 922594a9bd2d..d672ff90cdb9 100644 --- a/packages/path_provider/path_provider_windows/pubspec.yaml +++ b/packages/path_provider/path_provider_windows/pubspec.yaml @@ -1,7 +1,7 @@ name: path_provider_windows description: Windows implementation of the path_provider plugin homepage: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_windows -version: 0.1.0-nullsafety.2 +version: 0.1.0-nullsafety.3 flutter: plugin: @@ -16,8 +16,8 @@ dependencies: path: ^1.8.0-nullsafety.3 flutter: sdk: flutter - ffi: '>=0.3.0-nullsafety.1 <2.0.0' - win32: ^2.0.0-nullsafety.10 + ffi: ^1.0.0 + win32: ^2.0.0-nullsafety.12 dev_dependencies: flutter_test: