ImageArea class

A widget that displays an image with drag-and-drop support and various states. Uses an ImageController to manage the image data and state.

Inheritance

Constructors

ImageArea.new({required ImageController controller, required double width, required double height, String? onLoadingImage, BoxDecoration? decoration, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Widget? emptyChild, Widget? onErrorChild, Widget? onDragChild, Widget? onLoadingChild, BoxFit? fit, bool readOnly = false, Key? key})
Creates an ImageArea with specified width and height.
const
ImageArea.expand({required ImageController controller, String? onLoadingImage, BoxDecoration? decoration, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Widget? emptyChild, Widget? onErrorChild, Widget? onDragChild, Widget? onLoadingChild, BoxFit? fit, bool readOnly = false, Key? key})
Creates an ImageArea that expands to fill available space.
ImageArea.square({required ImageController controller, required double dimension, String? onLoadingImage, BoxDecoration? decoration, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Widget? emptyChild, Widget? onErrorChild, Widget? onDragChild, Widget? onLoadingChild, BoxFit? fit, bool readOnly = false, Key? key})
Creates a square ImageArea with equal width and height dimension.

Properties

controller ImageController
The controller managing image state and data.
final
decoration BoxDecoration?
Decoration for the container.
final
emptyChild Widget?
Widget to display when no image is loaded.
final
fit BoxFit?
How to fit the image within the container.
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the container.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
Margin around the container.
final
onDragChild Widget?
Widget to display when a drag operation is active.
final
onErrorChild Widget?
Widget to display when an error occurs.
final
onLoadingChild Widget?
Widget to display while loading.
final
onLoadingImage String?
Optional URL or path to an image to load on initialization.
final
padding EdgeInsetsGeometry?
Padding inside the container.
final
readOnly bool
If true, disables drag-and-drop and image picking.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double
Width of the container.
final

Methods

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