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

[image_picker_windows] Use const instead of final for XTypeGroup. #6544

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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