ContentTransition
How contents change in place
For a value changing inside a view that stays. numericText is for counters and totals; symbolEffect swaps one SF Symbol for another. Transition is the other one, for a whole view arriving or leaving.
Methods
ContentTransition.numericText(countsDown?)AnyRolls digits like an odometer. For counters and totals.
- countsDown Boolean
Roll downwards. Default false.
ContentTransition.interpolate()AnyBlends between the two states where the system can.
ContentTransition.opacity()AnyCross-fades the content.
ContentTransition.symbolEffect()AnySwaps one SF Symbol for another with its own effect.
ContentTransition.identity()AnyNo transition: the content simply changes.
Examples
A counter
Animated({
id: "steps",
value: steps,
contentTransition: ContentTransition.numericText(),
animation: Animation.snappy(),
child: Text(Format.number(steps)),
})