ImageEditor class

Simple and easy-to-use image editor widget

Usage:

ImageEditor(
  onSave: (file) => print('Saved: ${file.path}'),
)
Inheritance

Constructors

ImageEditor({Key? key, dynamic onSave(File savedImage)?, dynamic onError(String error)?, File? baseImage, String? baseImageUrl, List<String>? networkImages, EditorConfig? config, bool showGallery = true, bool showCamera = true, bool showNetwork = true})
const

Properties

baseImage File?
Optional base image to start with (local file)
final
baseImageUrl String?
Optional network image URL to use as background
final
config EditorConfig?
Configuration for appearance and behavior
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
networkImages List<String>?
Optional list of network image URLs to choose from as overlays
final
onError → dynamic Function(String error)?
Callback when an error occurs
final
onSave → dynamic Function(File savedImage)?
Callback when image is saved
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCamera bool
Whether to show camera button (default: true)
final
showGallery bool
Whether to show gallery button (default: true)
final
showNetwork bool
Whether to show network button (default: true)
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ImageEditor>
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