Bump ffi dependencies (#3540)
* Update to FFI 1.0
* Bump CHANGELOG
diff --git a/packages/path_provider/path_provider_windows/CHANGELOG.md b/packages/path_provider/path_provider_windows/CHANGELOG.md
index 6190c39..8d36531 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 c88e10a..db2ad9d 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 @@
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 @@
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 @@
}
}
- final path = pathPtrPtr.value.unpackString(MAX_PATH);
+ final path = pathPtrPtr.value.toDartString();
return Future.value(path);
} finally {
calloc.free(pathPtrPtr);
@@ -183,8 +183,8 @@
// 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 922594a..d672ff9 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 @@
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: