ComMarquee class
跑马灯组件
一个支持自定义滚动方向和速度的跑马灯组件。 支持水平和垂直方向的滚动,具有智能内容检测功能。
参数说明:
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ComMarquee
Constructors
- ComMarquee.new({Key? key, required Widget child, MarqueeDirection direction = MarqueeDirection.left, double speed = 50.0, bool infinite = true, bool autoStart = true, int pauseDuration = 0, bool pauseOnHover = false, VoidCallback? onComplete, MarqueeController? controller, double minScrollDistance = 0.0, bool scrollOnlyWhenOverflow = false})
-
const
Properties
- autoStart → bool
-
是否自动开始滚动
final
- child → Widget
-
要滚动的子组件
final
- controller → MarqueeController?
-
控制器
final
- direction → MarqueeDirection
-
滚动方向
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- infinite → bool
-
是否无限循环
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minScrollDistance → double
-
最小滚动距离(只有当内容超出容器时才滚动)
final
- onComplete → VoidCallback?
-
滚动完成回调
final
- pauseDuration → int
-
滚动间隔(毫秒)
final
- pauseOnHover → bool
-
是否在鼠标悬停时暂停
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollOnlyWhenOverflow → bool
-
是否只在内容超出容器时才滚动
final
- speed → double
-
滚动速度(每秒移动的像素数)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ComMarquee> -
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