Skip to content

Commit

Permalink
1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
chavesgu committed Dec 7, 2021
1 parent 0a6d755 commit 7dbca78
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .idea/libraries/Flutter_Plugins.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.2.9
add maxTime for pick video
## 1.2.8
fix android filename error
## 1.2.7
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# images_picker

[![images-picker](https://img.shields.io/badge/pub-1.2.8-orange)](https://pub.dev/packages/images_picker)
[![images-picker](https://img.shields.io/badge/pub-1.2.9-orange)](https://pub.dev/packages/images_picker)

Flutter plugin for selecting images/videos from the Android and iOS image library, and taking pictures/videos with the camera,save image/video to album/gallery

Expand Down Expand Up @@ -91,6 +91,13 @@ ImagesPicker.pick(
gif: true, // default is true
);
```
- add max video duration pick
```dart
ImagesPicker.pick(
// ...
maxTime: 30, // second
);
```
- add cropper (gif crop unsupported)
```dart
ImagesPicker.pick(
Expand Down Expand Up @@ -149,6 +156,7 @@ Future<File> downloadFile(String url) async {
int count = 1,
PickType pickType = PickType.image,
bool gif = true,
int maxTime = 120,
CropOption cropOpt,
int maxSize,
double quality,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
String pickType = call.argument("pickType");
double quality = call.argument("quality");
boolean supportGif = call.argument("gif");
int maxTime = call.argument("maxTime");
HashMap<String, Object> cropOption = call.argument("cropOption");
String language = call.argument("language");

Expand All @@ -154,6 +155,7 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
Utils.setPhotoSelectOpt(model, count, quality);
if (cropOption!=null) Utils.setCropOpt(model, cropOption);
model.isGif(supportGif);
model.videoMaxSecond(maxTime);
resolveMedias(model);
break;
}
Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ PODS:
- Flutter (1.0.0)
- images_picker (0.0.1):
- Flutter
- ZLPhotoBrowser (= 4.1.9)
- ZLPhotoBrowser (4.1.9):
- ZLPhotoBrowser/Core (= 4.1.9)
- ZLPhotoBrowser/Core (4.1.9)
- ZLPhotoBrowser (= 4.2.0)
- ZLPhotoBrowser (4.2.0):
- ZLPhotoBrowser/Core (= 4.2.0)
- ZLPhotoBrowser/Core (4.2.0)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -23,8 +23,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
images_picker: 7326dd6463f772a69f68bc228ebfabd7db3917c4
ZLPhotoBrowser: 320aec37f64b0f58d40abd852956c64530011ea4
images_picker: 8508f4097cec731ab87d47564ed964aa3fe942c7
ZLPhotoBrowser: 602d505d4f2cf7f309ce973c4353d33e85216d58

PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea

Expand Down
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class _MyAppState extends State<MyApp> {
count: 3,
pickType: PickType.all,
language: Language.System,
maxTime: 30,
// maxSize: 500,
// cropOpt: CropOption(
// aspectRatio: CropAspectRatio.wh16x9,
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.7"
version: "1.2.8"
matcher:
dependency: transitive
description:
Expand Down
1 change: 0 additions & 1 deletion images_picker.iml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
2 changes: 2 additions & 0 deletions ios/Classes/SwiftImagesPickerPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class SwiftImagesPickerPlugin: NSObject, FlutterPlugin {
let language = args!["language"] as! String;
let pickType = args!["pickType"] as? String;
let supportGif = args!["gif"] as! Bool;
let maxTime = args!["maxTime"] as! Int;
let maxSize = args!["maxSize"] as? Int;
let cropOption = args!["cropOption"] as? NSDictionary;
let theme = args!["theme"] as? NSDictionary;
Expand All @@ -38,6 +39,7 @@ public class SwiftImagesPickerPlugin: NSObject, FlutterPlugin {
self.setConfig(configuration: config, pickType: pickType);
config.maxSelectCount = count;
config.allowSelectGif = supportGif;
config.maxSelectVideoDuration = maxTime;
if cropOption != nil {
config.allowEditImage = true;
let corpType = cropOption!["cropType"] as! String;
Expand Down
2 changes: 1 addition & 1 deletion ios/images_picker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A new flutter plugin project.
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'ZLPhotoBrowser', '4.1.9'
s.dependency 'ZLPhotoBrowser', '4.2.0'
s.platform = :ios, '10.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down
2 changes: 2 additions & 0 deletions lib/images_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ImagesPicker {
int count = 1,
PickType pickType = PickType.image,
bool gif = true,
int maxTime = 120,
CropOption? cropOpt,
int? maxSize,
double? quality,
Expand All @@ -28,6 +29,7 @@ class ImagesPicker {
"count": count,
"pickType": pickType.toString(),
"gif": gif,
"maxTime": maxTime,
"maxSize": maxSize ?? null,
"quality": quality ?? -1,
"cropOption": cropOpt != null
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: images_picker
description: Flutter plugin for selecting images/videos from the Android and iOS image library, and taking pictures/videos with the camera,save image/video to album/gallery.
version: 1.2.8
version: 1.2.9
homepage: https://github.com/chavesgu/images_picker

environment:
Expand Down

0 comments on commit 7dbca78

Please sign in to comment.