CropRotateEditorConfigs class
Configuration options for a crop and rotate editor.
CropRotateEditorConfigs
allows you to define various settings for a
crop and rotate editor. You can enable or disable specific features like
cropping, rotating, and maintaining aspect ratio. Additionally, you can
specify an initial aspect ratio for cropping.
Example usage:
CropRotateEditorConfigs(
enabled: true,
enabledRotate: true,
enabledAspectRatio: true,
initAspectRatio: CropAspectRatios.custom,
);
Constructors
-
CropRotateEditorConfigs({bool enabled = true, bool canRotate = true, bool canChangeAspectRatio = true, double? initAspectRatio, List<
AspectRatioItem> aspectRatios = const [AspectRatioItem(text: 'Free', value: null), AspectRatioItem(text: 'Original', value: 0.0), AspectRatioItem(text: '1*1', value: 1.0 / 1.0), AspectRatioItem(text: '4*3', value: 4.0 / 3.0), AspectRatioItem(text: '3*4', value: 3.0 / 4.0), AspectRatioItem(text: '16*9', value: 16.0 / 9.0), AspectRatioItem(text: '9*16', value: 9.0 / 16.0)]}) -
Creates an instance of CropRotateEditorConfigs with optional settings.
const
Properties
-
aspectRatios
→ List<
AspectRatioItem> -
The allowed aspect ratios for cropping.
final
- canChangeAspectRatio → bool
-
Indicating whether the aspect ratio of the image can be changed.
final
- canRotate → bool
-
Indicating whether the image can be rotated.
final
- enabled → bool
-
Indicates whether the editor is enabled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initAspectRatio → double?
-
The initial aspect ratio for cropping.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited