ImageEditorControllerMixin mixin

ImageEditorControllerMixin provides a mixin with common image editing functions. It defines methods for actions like rotating, flipping, undoing, and redoing, which can be used in conjunction with an image editor controller.

Mixin applications

Properties

canRedo bool
Returns true if the user can redo a previously undone action, otherwise false.
no setter
canUndo bool
Returns true if the user can undo an action, otherwise false.
no setter
config EditorConfig
get the current config of the editor.
no setter
currentIndex int
The current index of the editor actions.
no setter
hashCode int
The hash code for this object.
no setterinherited
history List<EditActionDetails>
The history of the editor actions.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

flip({bool animation = false, Duration duration = const Duration(milliseconds: 200)}) → void
Flips the image horizontally. Optionally, you can animate the flip action.
getCropRect() Rect?
Get the rect to crop.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redo() → void
Redoes the most recent undone action.
reset() → void
Resets the image editor, undoing all changes.
rotate({double degree = 90, bool animation = false, Duration duration = const Duration(milliseconds: 200), bool rotateCropRect = true}) → void
Rotates the image by a specified angle, with an option to animate the rotation. Rotation of the crop rect occurs only if the angle is a multiple of 90.
saveCurrentState() → void
Save the current state of the editor.
toString() String
A string representation of this object.
inherited
undo() → void
Undoes the most recent action.
updateConfig(EditorConfig config) → void
update the current config of the editor
updateCropAspectRatio(double? aspectRatio) → void
Updates the crop aspect ratio of the image.

Operators

operator ==(Object other) bool
The equality operator.
inherited