ProImageEditor class
A widget for image editing using ProImageEditor.
ProImageEditor
provides a versatile image editing widget for Flutter applications.
It allows you to edit images from various sources like memory, files, assets, or network URLs.
You can use one of the specific constructors, such as memory
, file
, asset
, or network
,
to create an instance of this widget based on your image source. Additionally, you can provide
custom configuration settings through the configs
parameter.
Example usage:
ProImageEditor.memory(Uint8List.fromList(imageBytes));
ProImageEditor.file(File('path/to/image.jpg'));
ProImageEditor.asset('assets/images/image.png');
ProImageEditor.network('https://example.com/image.jpg');
To handle image editing, you can use the callbacks provided by the EditorConfigs
instance
passed through the configs
parameter.
See also:
- ProImageEditorConfigs for configuring image editing options.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ProImageEditor
Constructors
- ProImageEditor.asset(String assetPath, {Key? key, ProImageEditorConfigs configs = const ProImageEditorConfigs(), required ImageEditingCompleteCallback onImageEditingComplete, Function? onUpdateUI, Function? onCloseEditor})
-
Creates a
ProImageEditor
widget for editing an image from an asset.factory - ProImageEditor.file(File file, {Key? key, ProImageEditorConfigs configs = const ProImageEditorConfigs(), required ImageEditingCompleteCallback onImageEditingComplete, Function? onUpdateUI, Function? onCloseEditor})
-
Creates a
ProImageEditor
widget for editing an image from a file.factory - ProImageEditor.memory(Uint8List byteArray, {Key? key, required ImageEditingCompleteCallback onImageEditingComplete, Function? onUpdateUI, Function? onCloseEditor, ProImageEditorConfigs configs = const ProImageEditorConfigs()})
-
Creates a
ProImageEditor
widget for editing an image from memory.factory - ProImageEditor.network(String networkUrl, {Key? key, ProImageEditorConfigs configs = const ProImageEditorConfigs(), required ImageEditingCompleteCallback onImageEditingComplete, Function? onUpdateUI, Function? onCloseEditor})
-
Creates a
ProImageEditor
widget for editing an image from a network URL.factory
Properties
- assetPath → String?
-
Path to the image asset.
final
- byteArray → Uint8List?
-
Image data as a
Uint8List
from memory.final - configs → ProImageEditorConfigs
-
Configuration options for the image editor.
final
- file → File?
-
File object representing the image file.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- networkUrl → String?
-
URL of the image to be loaded from the network.
final
- onCloseEditor → Function?
-
A callback function that will be called before the image editor will close.
final
- onImageEditingComplete → ImageEditingCompleteCallback
-
A callback function that will be called when the editing is done,
and it returns the edited image as a Uint8List.
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
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ProImageEditor> -
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, int wrapWidth = 65}) → 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