From 7dbca78552a83096b5ada9710566122bb84c1ec2 Mon Sep 17 00:00:00 2001 From: chaves Date: Tue, 7 Dec 2021 12:40:49 +0800 Subject: [PATCH] 1.2.9 --- .idea/libraries/Flutter_Plugins.xml | 4 +++- .idea/workspace.xml | 12 +++++++++--- CHANGELOG.md | 2 ++ README.md | 10 +++++++++- .../chavesgu/images_picker/ImagesPickerPlugin.java | 2 ++ example/ios/Podfile.lock | 12 ++++++------ example/lib/main.dart | 1 + example/pubspec.lock | 2 +- images_picker.iml | 1 - ios/Classes/SwiftImagesPickerPlugin.swift | 2 ++ ios/images_picker.podspec | 2 +- lib/images_picker.dart | 2 ++ pubspec.yaml | 2 +- 13 files changed, 39 insertions(+), 15 deletions(-) diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml index b0f6971..53449da 100644 --- a/.idea/libraries/Flutter_Plugins.xml +++ b/.idea/libraries/Flutter_Plugins.xml @@ -1,6 +1,8 @@ - + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index fd7e919..c209b34 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -14,18 +14,24 @@ + - - - + + + + + + + + \ No newline at end of file diff --git a/ios/Classes/SwiftImagesPickerPlugin.swift b/ios/Classes/SwiftImagesPickerPlugin.swift index 47c07b8..1349886 100644 --- a/ios/Classes/SwiftImagesPickerPlugin.swift +++ b/ios/Classes/SwiftImagesPickerPlugin.swift @@ -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; @@ -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; diff --git a/ios/images_picker.podspec b/ios/images_picker.podspec index dcf8fec..b3e7fa7 100644 --- a/ios/images_picker.podspec +++ b/ios/images_picker.podspec @@ -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. diff --git a/lib/images_picker.dart b/lib/images_picker.dart index efd09b9..a5b50cc 100644 --- a/lib/images_picker.dart +++ b/lib/images_picker.dart @@ -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, @@ -28,6 +29,7 @@ class ImagesPicker { "count": count, "pickType": pickType.toString(), "gif": gif, + "maxTime": maxTime, "maxSize": maxSize ?? null, "quality": quality ?? -1, "cropOption": cropOpt != null diff --git a/pubspec.yaml b/pubspec.yaml index 5763ec9..8c64d0a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: