Skip to content

Commit

Permalink
1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
chavesgu committed Nov 30, 2021
1 parent 0646513 commit 0a6d755
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 7 deletions.
2 changes: 0 additions & 2 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.8
fix android filename error
## 1.2.7
fix android filename error
## 1.2.6
Expand Down
2 changes: 1 addition & 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.7-orange)](https://pub.dev/packages/images_picker)
[![images-picker](https://img.shields.io/badge/pub-1.2.8-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
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
PictureSelectionModel model = PictureSelector.create(activity)
.openCamera(chooseType);
model.setOutputCameraPath(context.getExternalCacheDir().getAbsolutePath());
if (pickType.equals("PickType.image")) {
model.cameraFileName("image_picker_camera_"+UUID.randomUUID().toString()+".jpg");
} else {
model.cameraFileName("image_picker_camera_"+UUID.randomUUID().toString()+".mp4");
}
model.recordVideoSecond(maxTime);
Utils.setLanguage(model, language);
Utils.setPhotoSelectOpt(model, 1, quality);
Expand Down
5 changes: 4 additions & 1 deletion android/src/main/java/com/chavesgu/images_picker/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.luck.picture.lib.PictureSelectionModel;
import com.luck.picture.lib.PictureSelector;
import com.luck.picture.lib.config.PictureConfig;
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.language.LanguageConfig;
import com.yalantis.ucrop.view.OverlayView;

Expand Down Expand Up @@ -35,9 +36,11 @@ public static PictureSelectionModel setPhotoSelectOpt(PictureSelectionModel mode
.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
.isOriginalImageControl(false)
.isMaxSelectEnabledMask(true)
.cameraFileName("image_picker_camera_"+UUID.randomUUID().toString()+".jpg")
.setCameraImageFormat(PictureMimeType.JPEG)
.setCameraVideoFormat(PictureMimeType.MP4)
.renameCompressFile("image_picker_compress_"+UUID.randomUUID().toString()+".jpg")
.renameCropFileName("image_picker_crop_"+UUID.randomUUID().toString()+".jpg")
// .cameraFileName("image_picker_camera_"+UUID.randomUUID().toString()+".jpg")
;
if (quality > 0) {
model.isCompress(true).compressQuality((int) ((double) quality * 100));
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class _MyAppState extends State<MyApp> {
onPressed: () async {
List<Media>? res = await ImagesPicker.openCamera(
// pickType: PickType.video,
pickType: PickType.image,
pickType: PickType.all,
quality: 0.8,
maxSize: 800,
// cropOpt: CropOption(
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.6"
version: "1.2.7"
matcher:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions images_picker.iml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
<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: 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.7
version: 1.2.8
homepage: https://github.com/chavesgu/images_picker

environment:
Expand Down

0 comments on commit 0a6d755

Please sign in to comment.