flutter_image_cropper icon indicating copy to clipboard operation
flutter_image_cropper copied to clipboard

How can I remove rotate buttons?

Open ameeee opened this issue 4 years ago • 1 comments

I want to remove rotate buttons on IOS , this is what I did in options.dart:

Map<String, dynamic> toMap() => { 'ios.minimum_aspect_ratio': this.minimumAspectRatio, 'ios.rect_x': this.rectX, 'ios.rect_y': this.rectY, 'ios.rect_width': this.rectWidth, 'ios.rect_height': this.rectHeight, 'ios.show_activity_sheet_on_done': this.showActivitySheetOnDone, 'ios.show_cancel_confirmation_dialog': this.showCancelConfirmationDialog, 'ios.rotate_clockwise_button_hidden': this.rotateClockwiseButtonHidden, 'ios.hides_navigation_bar': this.hidesNavigationBar, 'ios.rotate_button_hidden': true, 'ios.reset_button_hidden': true, 'ios.aspect_ratio_picker_button_hidden': this.aspectRatioPickerButtonHidden, 'ios.reset_aspect_ratio_enabled': this.resetAspectRatioEnabled, 'ios.aspect_ratio_lock_dimension_swap_enabled': this.aspectRatioLockDimensionSwapEnabled, 'ios.aspect_ratio_lock_enabled': this.aspectRatioLockEnabled, 'ios.title': this.title, 'ios.done_button_title': this.doneButtonTitle, 'ios.cancel_button_title': this.cancelButtonTitle, }; }

However, I still find them present.. How can I remove them? Simulator Screen Shot - iPhone 11 Pro Max - 2021-02-19 at 16 32 36

ameeee avatar Feb 19 '21 14:02 ameeee

try this:

File cropImage = await ImageCropper.cropImage( sourcePath: imageFile.path, aspectRatioPresets: [ CropAspectRatioPreset.square, CropAspectRatioPreset.ratio3x2, CropAspectRatioPreset.original, CropAspectRatioPreset.ratio4x3, CropAspectRatioPreset.ratio16x9, ], androidUiSettings: AndroidUiSettings( hideBottomControls: true), iosUiSettings: IOSUiSettings( rotateButtonsHidden: true, ));

cassioseffrin avatar May 26 '21 19:05 cassioseffrin