flutter_image_cropper
flutter_image_cropper copied to clipboard
How can I remove rotate buttons?
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?
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, ));