Skip to content

Commit

Permalink
1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
chavesgu committed Nov 25, 2021
1 parent 5ca24b5 commit 0646513
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
15 changes: 7 additions & 8 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.7
fix android filename error
## 1.2.6
fix ios openCamera no cancel callback
## 1.2.5
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.3-orange)](https://pub.dev/packages/images_picker)
[![images-picker](https://img.shields.io/badge/pub-1.2.7-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 @@ -164,7 +164,7 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
HashMap<String, Object> cropOption = call.argument("cropOption");
String language = call.argument("language");

int chooseType;
int chooseType = PictureMimeType.ofVideo();
switch (pickType) {
case "PickType.image":
chooseType = PictureMimeType.ofImage();
Expand Down Expand Up @@ -291,7 +291,7 @@ private String createVideoThumb(String path) {
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
try {
File outputDir = context.getCacheDir();
File outputFile = File.createTempFile("image_picker_"+ UUID.randomUUID().toString(), ".jpg", outputDir);
File outputFile = File.createTempFile("image_picker_thumb_"+ UUID.randomUUID().toString(), ".jpg", outputDir);
FileOutputStream fo = new FileOutputStream(outputFile);
fo.write(bytes.toByteArray());
fo.close();
Expand Down
6 changes: 3 additions & 3 deletions android/src/main/java/com/chavesgu/images_picker/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public static PictureSelectionModel setPhotoSelectOpt(PictureSelectionModel mode
.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
.isOriginalImageControl(false)
.isMaxSelectEnabledMask(true)
// .cameraFileName(UUID.randomUUID().toString())
// .renameCompressFile("images_picker_compress")
// .renameCropFileName("images_picker_crop")
.cameraFileName("image_picker_camera_"+UUID.randomUUID().toString()+".jpg")
.renameCompressFile("image_picker_compress_"+UUID.randomUUID().toString()+".jpg")
.renameCropFileName("image_picker_crop_"+UUID.randomUUID().toString()+".jpg")
;
if (quality > 0) {
model.isCompress(true).compressQuality((int) ((double) quality * 100));
Expand Down
9 changes: 5 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class _MyAppState extends State<MyApp> {
pickType: PickType.all,
language: Language.System,
// maxSize: 500,
cropOpt: CropOption(
aspectRatio: CropAspectRatio.wh16x9,
),
// cropOpt: CropOption(
// aspectRatio: CropAspectRatio.wh16x9,
// ),
);
print(res);
if (res != null) {
Expand All @@ -61,7 +61,8 @@ class _MyAppState extends State<MyApp> {
List<Media>? res = await ImagesPicker.openCamera(
// pickType: PickType.video,
pickType: PickType.image,
// quality: 0.5,
quality: 0.8,
maxSize: 800,
// 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.5"
version: "1.2.6"
matcher:
dependency: transitive
description:
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.6
version: 1.2.7
homepage: https://github.com/chavesgu/images_picker

environment:
Expand Down

0 comments on commit 0646513

Please sign in to comment.