Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
[image_picker_windows] Use const instead of final for XTypeGroup. (#6544
Browse files Browse the repository at this point in the history
)
  • Loading branch information
eugerossetto authored Oct 6, 2022
1 parent 3cd4360 commit d4db207
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion packages/image_picker/image_picker_windows/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.1.0+3

* Changes XTypeGroup initialization from final to const.
* Updates minimum Flutter version to 2.10.

## 0.1.0+2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
throw UnimplementedError(
'ImageSource.gallery is currently the only supported source on Windows');
}
final XTypeGroup typeGroup =
// TODO(stuartmorgan): https://github.com/flutter/flutter/issues/111906
// ignore: prefer_const_constructors
const XTypeGroup typeGroup =
XTypeGroup(label: 'images', extensions: imageFormats);
final XFile? file = await fileSelector
.openFile(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
Expand All @@ -144,9 +142,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
throw UnimplementedError(
'ImageSource.gallery is currently the only supported source on Windows');
}
final XTypeGroup typeGroup =
// TODO(stuartmorgan): https://github.com/flutter/flutter/issues/111906
// ignore: prefer_const_constructors
const XTypeGroup typeGroup =
XTypeGroup(label: 'videos', extensions: videoFormats);
final XFile? file = await fileSelector
.openFile(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
Expand All @@ -162,9 +158,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
double? maxHeight,
int? imageQuality,
}) async {
final XTypeGroup typeGroup =
// TODO(stuartmorgan): https://github.com/flutter/flutter/issues/111906
// ignore: prefer_const_constructors
const XTypeGroup typeGroup =
XTypeGroup(label: 'images', extensions: imageFormats);
final List<XFile> files = await fileSelector
.openFiles(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
Expand Down
4 changes: 2 additions & 2 deletions packages/image_picker/image_picker_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: image_picker_windows
description: Windows platform implementation of image_picker
repository: https://github.com/flutter/plugins/tree/main/packages/image_picker/image_picker_windows
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
version: 0.1.0+2
version: 0.1.0+3

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -16,7 +16,7 @@ flutter:
dartPluginClass: ImagePickerWindows

dependencies:
file_selector_platform_interface: ^2.0.4
file_selector_platform_interface: ^2.2.0
file_selector_windows: ^0.8.2
flutter:
sdk: flutter
Expand Down

0 comments on commit d4db207

Please sign in to comment.