Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
031dfd2
[image_picker] Added image_picker_for_windows.
azchohfi Feb 15, 2022
d4ddc85
Merge branch 'main' into image_picker_win_fs
azchohfi Feb 17, 2022
ad41c89
More windows work.
azchohfi Feb 17, 2022
0deefd1
Merge branch 'main' into image_picker_win_fs
azchohfi Feb 17, 2022
59b831d
Applied PR feedback.
azchohfi Feb 17, 2022
fb7ac4d
Added image_picker_windows tests.
azchohfi Feb 17, 2022
aeb1d04
Excl image_picker_windows win32 integration tests.
azchohfi Feb 17, 2022
de25b0a
Merge branch 'main' into image_picker_win_fs
azchohfi Feb 23, 2022
e63c96a
Merge branch 'main' into image_picker_win_fs
azchohfi Feb 24, 2022
08fa003
[image_picker_windows] Added its own FileSelectorWindows instance
azchohfi Feb 24, 2022
e45109e
Merge branch 'main' into image_picker_win_fs
azchohfi Feb 25, 2022
69a1b81
Fix test.
azchohfi Feb 25, 2022
7ab06be
Merge branch 'main' into image_picker_win_fs
azchohfi Feb 28, 2022
132b808
Documentation fixes.
azchohfi Mar 1, 2022
922b42b
Improved UnimplementedError message on Windows.
azchohfi Mar 7, 2022
8ab457b
Changed tests based on PR feedback.
azchohfi Mar 7, 2022
6c11ff2
Merge branch 'main' into image_picker_win_fs
azchohfi Mar 8, 2022
d4b7821
Added tests for unimplemented camera source.
azchohfi Mar 11, 2022
f5dbb22
Merge branch 'main' into image_picker_win_fs
azchohfi Mar 28, 2022
34d1c2f
Merge branch 'main' into image_picker_win_fs
azchohfi Apr 7, 2022
ea55c42
Merge branch 'main' into image_picker_win_fs
azchohfi Apr 18, 2022
c3f46ee
Applied PR feedback.
azchohfi Apr 18, 2022
65e4f57
Merge branch 'main' into image_picker_win_fs
azchohfi Apr 20, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class ImagePickerWindows extends ImagePickerPlatform {
/// Constructs a ImagePickerWindows.
ImagePickerWindows();

static FileSelectorWindows get _fileSelectorInstance => FileSelectorWindows();
Comment thread
azchohfi marked this conversation as resolved.
Outdated

/// Registers this class as the default instance of [ImagePickerPlatform].
static void registerWith() {
ImagePickerPlatform.instance = ImagePickerWindows();
FileSelectorWindows.registerWith();
}

// Note that the `maxWidth`, `maxHeight` and `imageQuality` arguments are
Comment thread
azchohfi marked this conversation as resolved.
Outdated
Expand Down Expand Up @@ -101,7 +102,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
}) async {
final XTypeGroup typeGroup =
XTypeGroup(label: 'images', extensions: _imageFormats);
final XFile? file = await FileSelectorPlatform.instance
final XFile? file = await _fileSelectorInstance
.openFile(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
return file;
}
Expand All @@ -118,7 +119,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
}) async {
final XTypeGroup typeGroup =
XTypeGroup(label: 'videos', extensions: _videoFormats);
final XFile? file = await FileSelectorPlatform.instance
final XFile? file = await _fileSelectorInstance
.openFile(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
return file;
}
Expand All @@ -134,7 +135,7 @@ class ImagePickerWindows extends ImagePickerPlatform {
}) async {
final XTypeGroup typeGroup =
XTypeGroup(label: 'images', extensions: _imageFormats);
final List<XFile> files = await FileSelectorPlatform.instance
final List<XFile> files = await _fileSelectorInstance
.openFiles(acceptedTypeGroups: <XTypeGroup>[typeGroup]);
return files;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ void main() {
test('registered instance', () {
ImagePickerWindows.registerWith();
expect(ImagePickerPlatform.instance, isA<ImagePickerWindows>());
expect(FileSelectorPlatform.instance, isA<FileSelectorWindows>());
});

group('images', () {
Expand Down