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

Commit d4db207

Browse files
authored
[image_picker_windows] Use const instead of final for XTypeGroup. (#6544)
1 parent 3cd4360 commit d4db207

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

packages/image_picker/image_picker_windows/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.1.0+3
22

3+
* Changes XTypeGroup initialization from final to const.
34
* Updates minimum Flutter version to 2.10.
45

56
## 0.1.0+2

packages/image_picker/image_picker_windows/lib/image_picker_windows.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
118118
throw UnimplementedError(
119119
'ImageSource.gallery is currently the only supported source on Windows');
120120
}
121-
final XTypeGroup typeGroup =
122-
// TODO(stuartmorgan): https://github.com/flutter/flutter/issues/111906
123-
// ignore: prefer_const_constructors
121+
const XTypeGroup typeGroup =
124122
XTypeGroup(label: 'images', extensions: imageFormats);
125123
final XFile? file = await fileSelector
126124
.openFile(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
@@ -144,9 +142,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
144142
throw UnimplementedError(
145143
'ImageSource.gallery is currently the only supported source on Windows');
146144
}
147-
final XTypeGroup typeGroup =
148-
// TODO(stuartmorgan): https://github.com/flutter/flutter/issues/111906
149-
// ignore: prefer_const_constructors
145+
const XTypeGroup typeGroup =
150146
XTypeGroup(label: 'videos', extensions: videoFormats);
151147
final XFile? file = await fileSelector
152148
.openFile(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
@@ -162,9 +158,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
162158
double? maxHeight,
163159
int? imageQuality,
164160
}) async {
165-
final XTypeGroup typeGroup =
166-
// TODO(stuartmorgan): https://github.com/flutter/flutter/issues/111906
167-
// ignore: prefer_const_constructors
161+
const XTypeGroup typeGroup =
168162
XTypeGroup(label: 'images', extensions: imageFormats);
169163
final List<XFile> files = await fileSelector
170164
.openFiles(acceptedTypeGroups: <XTypeGroup>[typeGroup]);

packages/image_picker/image_picker_windows/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: image_picker_windows
22
description: Windows platform implementation of image_picker
33
repository: https://github.com/flutter/plugins/tree/main/packages/image_picker/image_picker_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
5-
version: 0.1.0+2
5+
version: 0.1.0+3
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
@@ -16,7 +16,7 @@ flutter:
1616
dartPluginClass: ImagePickerWindows
1717

1818
dependencies:
19-
file_selector_platform_interface: ^2.0.4
19+
file_selector_platform_interface: ^2.2.0
2020
file_selector_windows: ^0.8.2
2121
flutter:
2222
sdk: flutter

0 commit comments

Comments
 (0)