CxSliderView class

Slider View Component.

It's very simple in its current state.

{@tool snippet}

Usage:

CxSliderView(
  height: 150,
  onTap: (SliderObject obj, int index) {
    // print("click the item $index");
  },
  objects: [
    SliderObject("海豹看看",
        "https://puui.qpic.cn/vcover_hz_pic/0/mzc00200q7mndle1664438925875/332?max_age=7776001"),
    SliderObject("故宫里的大怪兽之莫奈何的谜题",
        "https://puui.qpic.cn/vcover_hz_pic/0/mzc00200ap8s2p31697455490020/332?max_age=7776001"),
    SliderObject("小不点.....",
        "https://puui.qpic.cn/vpic_cover/m0038bibwlq/m0038bibwlq_hz.jpg/640"),
  ],
)

{@end-tool}

See more: SliderObject is the item of the list.

Inheritance

Constructors

CxSliderView({Key? key, required List<SliderObject> objects, void onTap(SliderObject, int)?, double? height, double? titleSize, Color? titleColor})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
height double?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
objects List<SliderObject>
final
onTap → void Function(SliderObject, int)?
the click event of the component.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
titleColor Color?
the color of title. Default is Colors.white.
final
titleSize double?
the size of title. Default is 12.
final

Methods

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