CustomImage class

you can decide which file type you are showing:

  1. If asset or network, directly add the image url in imageUrl parameter.

  2. If file, then please make imageUrl to empty string and add the file in image param.

  3. If set to memory, then please make imageUrl to empty string and add the Uint8List in imageBytes param.

Inheritance

Constructors

CustomImage.new({Key? key, required String imageUrl, File? image, Uint8List? imageBytes, double? height, bool isBackgroundImage = true, double? width, double padding = 0, double? borderRadius, Color? overlayColor = Colors.black12, Border? border, CustomFileType fileType = CustomFileType.network, BoxFit? fit = BoxFit.cover, bool showLoader = false})
this is the constructor of the custom image
const

Properties

border Border?
this is the border of the custom image
final
borderRadius double?
this is the width of the custom image
final
fileType CustomFileType
this is the fileType of the custom image
final
fit BoxFit?
this is the fit of the custom image
final
hashCode int
The hash code for this object.
no setterinherited
height double?
this is the height of the custom image
final
image File?
this is the fil of the custom image
final
imageBytes Uint8List?
this is the imag of the custom image
final
imageUrl String
this is the imageUrl of the custom image
final
isBackgroundImage bool
this is the isBackgroundImage of the custom image
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
overlayColor Color?
this is the overlayColor of the custom image
final
padding double
this is the padding of the custom image
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLoader bool
this is the showLoader of the custom image
final
width double?
this is the width of the custom image
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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