NetImgCarousel class

Inheritance

Constructors

NetImgCarousel(List<String> imageUrls, {Key? key, double height = 400.0, double width = 0.0, FunctionWithAInt? onUnitTapped, FunctionWithAInt? onIndicatorTapped, bool useindicator = true, Color indicatorColor = Colors.white, Color currentIndicatorColor = Colors.blue, double indicatorWidth = 40.0, double indicatorHeight = 26.0, double indicatorMargin = 3.0, double indicatorToBottom = 10.0, BoxShape indicatorShape = BoxShape.rectangle, FunctionIndicatorBuilder? indicatorBuilder, bool pageSnapping = true, bool padEnds = true, Clip clipBehavior = Clip.hardEdge, bool reverse = false, Axis scrollDirection = Axis.horizontal, CarouselController? controller, bool disableIndicatorDefaultCallbacks = false, double imgScale = 1.0, ImageFrameBuilder? imgFrameBuilder, ImageLoadingBuilder? imgLoadingBuilder, bool imgExcludeFromSemantics = false, AlignmentGeometry imgAlignment = Alignment.center, ImageRepeat imgRepeat = ImageRepeat.noRepeat, bool imgMatchTextDirection = false, bool imgGaplessPlayback = false, FilterQuality imgFilterQuality = FilterQuality.low, bool imgIsAntiAlias = false, ImageErrorWidgetBuilder? imgErrorBuilder, String? imgSemanticLabel, double? imgWidth, double? imgHeight, Color? imgColor, Animation<double>? imgOpacity, BlendMode? imgColorBlendMode, BoxFit? imgFit, Rect? imgCenterSlice, Map<String, String>? imgHeaders, int? imgCacheWidth, int? imgCacheHeight})
const

Properties

clipBehavior Clip
The behavior for the clip. 剪裁的行为
final
controller CarouselController?
Carousel controller, optional. 轮播控制器,可选
final
currentIndicatorColor Color
Color of the currently selected indicator. 当前选中指示器的颜色
final
disableIndicatorDefaultCallbacks bool
Whether to disable default indicator callback functions. 是否禁用默认指示器回调函数
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the carousel component. 轮播组件的高度
final
imageUrls List<String>
List of network image URLs to be displayed in the carousel. 要在轮播中显示的网络图片URL列表
final
imgAlignment AlignmentGeometry
Alignment of the image, optional. 图像的对齐方式,可选
final
imgCacheHeight int?
Height to which the image should be cached, optional. 图像应该缓存到的高度,可选
final
imgCacheWidth int?
Width to which the image should be cached, optional. 图像应该缓存到的宽度,可选
final
imgCenterSlice Rect?
Center slice for the image, optional. 图像的中心切片,可选
final
imgColor Color?
Color of the image, optional. 图像的颜色,可选
final
imgColorBlendMode BlendMode?
Blend mode for the image color, optional. 图像颜色的混合模式,可选
final
imgErrorBuilder ImageErrorWidgetBuilder?
Builder for image error widget, optional. 图片错误小部件的构建器,可选
final
imgExcludeFromSemantics bool
Whether to exclude the image from semantics, defaults to false. 是否排除图像从语义中,默认为false
final
imgFilterQuality FilterQuality
Filter quality for the image, optional. 图像的滤镜质量,可选
final
imgFit BoxFit?
Fit of the image, optional. 图像的适应方式,可选
final
imgFrameBuilder ImageFrameBuilder?
Builder for image frames, optional. 图片帧的构建器,可选
final
imgGaplessPlayback bool
Whether to enable gapless playback for the image, optional. 是否启用无缝播放图像,可选
final
imgHeaders Map<String, String>?
Headers for network requests when fetching images, optional. 获取图像时的网络请求头,可选
final
imgHeight double?
Height of the image, optional. 图像的高度,可选
final
imgIsAntiAlias bool
Whether the image is anti-aliased, optional. 图像是否反锯齿,可选
final
imgLoadingBuilder ImageLoadingBuilder?
Builder for image loading, optional. 图片加载的构建器,可选
final
imgMatchTextDirection bool
Whether the image matches text direction, optional. 图像是否匹配文本方向,可选
final
imgOpacity Animation<double>?
Opacity of the image, optional. 图像的不透明度,可选
final
imgRepeat ImageRepeat
Repeat mode for the image, optional. 图像的重复模式,可选
final
imgScale double
Image scale factor, defaults to 1.0. 图片缩放因子,默认为1.0
final
imgSemanticLabel String?
Semantic label for the image, optional. 图像的语义标签,可选
final
imgWidth double?
Width of the image, optional. 图像的宽度,可选
final
indicatorBuilder FunctionIndicatorBuilder?
Custom indicator builder function, optional. 自定义指示器构建函数,可选
final
indicatorColor Color
Default indicator color. 默认指示器颜色
final
indicatorHeight double
Indicator height. 指示器高度
final
indicatorMargin double
Spacing between indicators. 指示器之间的间距
final
indicatorShape BoxShape
Default indicator shape, defaults to a rectangle. 默认指示器形状,默认为矩形
final
indicatorToBottom double
Distance of indicators from the bottom. 指示器距离底部的距离
final
indicatorWidth double
Indicator width. 指示器宽度
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onIndicatorTapped FunctionWithAInt?
Callback function when an indicator is clicked, optional. 当指示器被点击时的回调函数,可选
final
onUnitTapped FunctionWithAInt?
Callback function when a unit in the carousel is clicked, optional. 当轮播单元被点击时的回调函数,可选
final
padEnds bool
Whether to add extra pages at the beginning and end of the carousel, default is true. 是否在轮播首尾添加额外的页面,默认为true
final
pageSnapping bool
Whether to enable page snapping, defaults to true. 是否启用页面快速吸附,默认为true
final
reverse bool
Whether to reverse the order of items. 是否倒序项目的顺序
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
The axis along which the page view scrolls. 页面视图滚动的轴
final
useindicator bool
Whether to use indicators, defaults to true. 是否使用指示器,默认为true
final
width double
Width of the carousel component. 轮播组件的宽度
final

Methods

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