CropRotateEditor class
The CropRotateEditor
widget is used for cropping and rotating images.
It provides various constructors for loading images from different sources and allows users to crop and rotate the image.
You can create a CropRotateEditor
using one of the factory methods provided:
CropRotateEditor.file
: Loads an image from a file.CropRotateEditor.asset
: Loads an image from an asset.CropRotateEditor.network
: Loads an image from a network URL.CropRotateEditor.memory
: Loads an image from memory as aUint8List
.CropRotateEditor.autoSource
: Automatically selects the source based on provided parameters.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CropRotateEditor
Constructors
- CropRotateEditor.asset(String assetPath, {Key? key, required ThemeData theme, required Size imageSize, ProImageEditorConfigs configs = const ProImageEditorConfigs(), Uint8List? bytesWithLayers, Function? onUpdateUI})
-
Create a CropRotateEditor widget with an image loaded from an asset.
factory
- CropRotateEditor.autoSource({Key? key, required ThemeData theme, required Size imageSize, ProImageEditorConfigs configs = const ProImageEditorConfigs(), Uint8List? bytesWithLayers, Function? onUpdateUI, Uint8List? byteArray, File? file, String? assetPath, String? networkUrl})
-
Create a CropRotateEditor widget with automatic image source detection.
factory
- CropRotateEditor.file(File file, {Key? key, required ThemeData theme, required Size imageSize, ProImageEditorConfigs configs = const ProImageEditorConfigs(), Uint8List? bytesWithLayers, Function? onUpdateUI})
-
Create a CropRotateEditor widget with an image loaded from a File.
factory
- CropRotateEditor.memory(Uint8List byteArray, {Key? key, required ThemeData theme, required Size imageSize, ProImageEditorConfigs configs = const ProImageEditorConfigs(), Uint8List? bytesWithLayers, Function? onUpdateUI})
-
Create a CropRotateEditor widget with an in-memory image represented as a Uint8List.
factory
- CropRotateEditor.network(String networkUrl, {Key? key, required ThemeData theme, required Size imageSize, ProImageEditorConfigs configs = const ProImageEditorConfigs(), Uint8List? bytesWithLayers, Function? onUpdateUI})
-
Create a CropRotateEditor widget with an image loaded from a network URL.
factory
Properties
- assetPath → String?
-
The asset path of the image.
final
- byteArray → Uint8List?
-
A byte array representing the image data.
final
- bytesWithLayers → Uint8List?
-
The image data with layers (if any) for editing.
final
- configs → ProImageEditorConfigs
-
The image editor configs
final
- file → File?
-
The file representing the image.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageSize → Size
-
The size of the image to be edited.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- networkUrl → String?
-
The network URL of the image.
final
- onUpdateUI → Function?
-
A callback function that can be used to update the UI from custom widgets.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → ThemeData
-
The theme configuration for the editor.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CropRotateEditor> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited