CrossFade<T> class

widget for provide fade animation

when data(T) has changed the initialData , data , and builder is required. the duration is duration of animation (defaults is 300 millisseconds)

Inheritance

Constructors

CrossFade({Key? key, required T initialData, required T data, required Widget builder(T data), Duration duration = const Duration(milliseconds: 300), VoidCallback? onFadeComplete})
the initialData , data , and builder is required. the duration is duration of animation (defaults is 300 millisseconds)
const

Properties

builder Widget Function(T data)
this function will build children widget
final
data → T
listened data, when it's changed will trigger fade animation
final
duration Duration
the duration of animation (defaults is 300 millisseconds)
final
hashCode int
The hash code for this object.
no setterinherited
initialData → T
initial data when widget initialized
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFadeComplete VoidCallback?
this function will triggered when fadeanimation triggered
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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