CyberImage class

CyberImage - Image control với binding, upload, view, delete

Inheritance

Constructors

CyberImage({Key? key, dynamic text, String? label, dynamic isUpload = false, dynamic isView = true, dynamic isDelete = false, double? width, double? height = 200, dynamic fit = "cover", double borderRadius = 12.0, Widget? placeholder, Widget? errorWidget, TextStyle? labelStyle, bool isShowLabel = true, ValueChanged<String>? onChanged, dynamic onLeaver(dynamic)?, Color? backgroundColor, Color? borderColor, double borderWidth = 2.0, bool enabled = true, dynamic isVisible = true, bool enableCompression = true, int compressionQuality = 85, int? maxWidth = 1920, int? maxHeight = 1920, IconData? uploadIcon, IconData? viewIcon, IconData? deleteIcon, bool isCircle = false})
const

Properties

backgroundColor → Color?
Màu nền
final
borderColor → Color?
Border color
final
borderRadius → double
Border radius
final
borderWidth → double
Border width
final
compressionQuality → int
Chất lượng nén (0-100)
final
deleteIcon → IconData?
final
enableCompression → bool
Có nén ảnh khi upload không
final
enabled → bool
Có enable hay không
final
errorWidget → Widget?
Widget hiển thị khi lỗi
final
fit → dynamic
Fit mode của image - Có thể binding Values: "fill", "cover", "contain", "fitwidth", "fitheight", "center", "scaledown" hoặc BoxFit enum
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
Chiều cao của image
final
isCircle → bool
Shape của image (circle hoặc rectangle)
final
isDelete → dynamic
Cho phép xóa ảnh
final
isShowLabel → bool
Có hiển thị label không
final
isUpload → dynamic
Cho phép upload ảnh (chụp/chọn)
final
isView → dynamic
Cho phép view ảnh fullscreen
final
isVisible → dynamic
Visibility binding
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
Label hiển thị phía trên
final
labelStyle → TextStyle?
Style cho label
final
maxHeight → int?
final
maxWidth → int?
Kích thước max sau khi nén
final
onChanged → ValueChanged<String>?
Callback khi ảnh thay đổi (upload/delete)
final
onLeaver → dynamic Function(dynamic)?
Callback khi rời khỏi control
final
placeholder → Widget?
Placeholder khi chưa có ảnh
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → dynamic
Binding đến field chứa image (URL, path, hoặc base64)
final
uploadIcon → IconData?
Icon cho các action buttons
final
viewIcon → IconData?
final
width → double?
Chiều rộng của image
final

Methods

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