expansionAnimationStyle property

AnimationStyle? expansionAnimationStyle
final

Used to override the expansion animation curve and duration.

If AnimationStyle.duration is provided, it will be used to override the expansion animation duration. If it is null, then AnimationStyle.duration from the ExpansionTileThemeData.expansionAnimationStyle will be used. Otherwise, defaults to 200ms.

If AnimationStyle.curve is provided, it will be used to override the expansion animation curve. If it is null, then AnimationStyle.curve from the ExpansionTileThemeData.expansionAnimationStyle will be used. Otherwise, defaults to Curves.easeIn.

If AnimationStyle.reverseCurve is provided, it will be used to override the collapse animation curve. If it is null, then AnimationStyle.reverseCurve from the ExpansionTileThemeData.expansionAnimationStyle will be used. Otherwise, the same curve will be used as for expansion.

To disable the theme animation, use AnimationStyle.noAnimation.

This sample showcases how to override the ExpansionTile expansion animation curve and duration using AnimationStyle.
link

To create a local project with this code sample, run:
flutter create --sample=material.ExpansionTile.expansionAnimationStyle.1 mysample

Implementation

final AnimationStyle? expansionAnimationStyle;