Skip to content

Commit

Permalink
Update deprecated properties for file picker windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Jun 12, 2024
1 parent a5ed06f commit 9c6cba9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/windows/file_picker_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ 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);

Expand Down Expand Up @@ -134,7 +136,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);
Expand Down

0 comments on commit 9c6cba9

Please sign in to comment.