CrossFade<T> class
A widget to apply a crossfade animation between different states and/or widgets.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CrossFade
Constructors
- CrossFade({Key? key, Duration duration = const Duration(milliseconds: 750), required T value, required Widget builder(BuildContext, T), bool equals(T, T) = _defaultEquals, bool highlightTransition(T, T) = _defaultHighlightTransition, AlignmentGeometry stackAlignment = AlignmentDirectional.center, double highlightScale = 1.2, Duration? highlightDuration, Clip clipBehavior = Clip.none, Curve curve = Curves.easeIn, Curve? disappearingCurve, Curve highlightingCurve = Curves.ease, Curve? highlightingReverseCurve, Curve sizeCurve = Curves.linear, Duration? sizeDuration})
-
The default constructor of CrossFade.
const
Properties
- builder → Widget Function(BuildContext, T)
-
The builder which builds the different values during the animation.
final
- clipBehavior → Clip
-
The clip behaviour for clipping while the size animation.
For more customization like BorderRadius or similar please use
widgets like ClipRRect or Container and their clipBehavior.
final
- curve → Curve
-
Curve of the fading in animation.
final
- disappearingCurve → Curve?
-
Curve of the fading out animation. Defaults to
curve.flipped
.final - duration → Duration
-
The duration of the fading.
final
- equals → bool Function(T, T)
-
The overriding of the equals function.
CrossFade only animates between two different values
if equals returns
false
for these two.final - hashCode → int
-
The hash code for this object.
no setterinherited
- highlightDuration → Duration?
-
The duration of the whole highlight animation. Defaults to duration.
final
- highlightingCurve → Curve
-
Curve of the highlighting animation.
final
- highlightingReverseCurve → Curve?
-
Reverse curve of the highlighting animation.
Defaults to
highlightingCurve.flipped
.final - highlightScale → double
-
The maximum scale during the highlight animation.
final
- highlightTransition → bool Function(T, T)
-
CrossFade only highlights the new value during the animation
if highlightTransition returns
true
.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sizeCurve → Curve
-
Curve of the size animation.
final
- sizeDuration → Duration?
-
Duration of the size animation. Defaults to duration.
final
- stackAlignment → AlignmentGeometry
-
The alignment for the children of the underlying stack.
final
- value → T
-
The current value.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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