From 07f1f990b8b526cab4187976ab416f3ab27a1c80 Mon Sep 17 00:00:00 2001 From: DatDang Date: Tue, 11 Jun 2024 16:51:20 +0700 Subject: [PATCH] Update deprecated properties for file picker windows --- lib/src/windows/file_picker_windows.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/windows/file_picker_windows.dart b/lib/src/windows/file_picker_windows.dart index a5b92c94..dd542368 100644 --- a/lib/src/windows/file_picker_windows.dart +++ b/lib/src/windows/file_picker_windows.dart @@ -94,7 +94,7 @@ class FilePickerWindows extends FilePicker { String? initialDirectory, }) { int hr = CoInitializeEx( - nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + nullptr, COINIT.COINIT_APARTMENTTHREADED | COINIT.COINIT_DISABLE_OLE1DDE); if (!SUCCEEDED(hr)) throw WindowsException(hr); @@ -134,7 +134,7 @@ class FilePickerWindows extends FilePicker { if (!SUCCEEDED(hr)) { CoUninitialize(); - if (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED)) { + if (hr == HRESULT_FROM_WIN32(WIN32_ERROR.ERROR_CANCELLED)) { return Future.value(null); } throw WindowsException(hr);