NetImage class

Inheritance

Constructors

NetImage(String imageUrl, {Key? key, ImageWidgetBuilder? imageBuilder, PlaceholderWidgetBuilder? placeholder, LoadingErrorWidgetBuilder? errorWidget, Duration fadeOutDuration = const Duration(milliseconds: 300), Curve fadeOutCurve = Curves.easeOut, Duration fadeInDuration = const Duration(milliseconds: 700), Curve fadeInCurve = Curves.easeIn, double? width, double? height, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, bool matchTextDirection = false, Map<String, String>? httpHeaders, BaseCacheManager? cacheManager, bool useOldImageOnUrlChange = false, Color? color, BlendMode? colorBlendMode, bool fullScreen = false, bool hero = false, BorderRadius? borderRadius, GestureTapCallback? onTap})
const

Properties

alignment AlignmentGeometry
How to align the image within its bounds.
final
borderRadius BorderRadius?
defaults to 0
final
cacheManager → BaseCacheManager?
Option to use cachemanager with other settings
final
color Color?
If non-null, this color is blended with each image pixel using colorBlendMode.
final
colorBlendMode BlendMode?
Used to combine color with this image.
final
errorWidget → LoadingErrorWidgetBuilder?
Widget displayed while the target imageUrl failed loading.
final
fadeInCurve Curve
The curve of the fade-in animation for the imageUrl.
final
fadeInDuration Duration
The duration of the fade-in animation for the imageUrl.
final
fadeOutCurve Curve
The curve of the fade-out animation for the placeholder.
final
fadeOutDuration Duration
The duration of the fade-out animation for the placeholder.
final
fit BoxFit?
How to inscribe the image into the space allocated during layout.
final
fullScreen bool
default false.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
If non-null, require the image to have this height.
final
hero bool
Adds hero animation, uses the url as the hero tag. fullScreen needs to be true for this to work. default false.
final
httpHeaders Map<String, String>?
final
imageBuilder → ImageWidgetBuilder?
Optional builder to further customize the display of the image.
final
imageUrl String
The target image that is displayed.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
matchTextDirection bool
Whether to paint the image in the direction of the TextDirection.
final
onTap GestureTapCallback?
Called when the user taps this part of the image.
final
placeholder → PlaceholderWidgetBuilder?
Widget displayed while the target imageUrl is loading.
final
repeat ImageRepeat
How to paint any portions of the layout bounds not covered by the image.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useOldImageOnUrlChange bool
When set to true it will animate from the old image to the new image if the url changes.
final
width double?
If non-null, require the image to have this width.
final

Methods

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