-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[image_picker] getMedia platform changes (#4174)
Adds `getMedia` and `getMultipleMedia` methods to image_picker_platform_interface. precursor to #3892 part of flutter/flutter#89159
- Loading branch information
1 parent
ecf2b68
commit 6565f17
Showing
12 changed files
with
316 additions
and
60 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/image_picker/image_picker_platform_interface/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 0 additions & 50 deletions
50
...ages/image_picker/image_picker_platform_interface/lib/src/types/image_picker_options.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/image_picker/image_picker_platform_interface/lib/src/types/media_options.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:flutter/foundation.dart'; | ||
|
||
import '../../image_picker_platform_interface.dart'; | ||
|
||
/// Specifies options for selecting items when using [ImagePickerPlatform.getMedia]. | ||
@immutable | ||
class MediaOptions { | ||
/// Construct a new MediaOptions instance. | ||
const MediaOptions({ | ||
this.imageOptions = const ImageOptions(), | ||
required this.allowMultiple, | ||
}); | ||
|
||
/// Options that will apply to images upon selection. | ||
final ImageOptions imageOptions; | ||
|
||
/// Whether to allow for selecting multiple media. | ||
final bool allowMultiple; | ||
} |
14 changes: 14 additions & 0 deletions
14
...ages/image_picker/image_picker_platform_interface/lib/src/types/media_selection_type.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import '../../image_picker_platform_interface.dart'; | ||
|
||
/// The type of media to allow the user to select with [ImagePickerPlatform.getMedia]. | ||
enum MediaSelectionType { | ||
/// Static pictures. | ||
image, | ||
|
||
/// Videos. | ||
video, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.