animateTo method
Future<void>
animateTo(
- FTime value, {
- Duration duration = const Duration(milliseconds: 300),
- Curve curve = Curves.easeOutCubic,
inherited
Animates the controller to the given value.
Testing
To avoid timeouts in widget tests, always wrap the returned Future in unawaited.
testWidgets('shows', (tester) async {
await tester.pumpWidget(...);
unawaited(controller.show());
await tester.pumpAndSettle();
});
Implementation
Future<void> animateTo(
T value, {
Duration duration = const Duration(milliseconds: 300),
Curve curve = Curves.easeOutCubic,
}) async {
if (rawValue != value) {
await rawAnimateTo(value, duration, curve);
}
}