animateTo method

Future<void> animateTo(
  1. List<int> value, {
  2. Duration duration = const Duration(milliseconds: 300),
  3. Curve curve = Curves.easeOutCubic,
})

Animates the wheels 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(
  List<int> value, {
  Duration duration = const Duration(milliseconds: 300),
  Curve curve = Curves.easeOutCubic,
}) async {
  if (!listEquals(_rawValue, value)) {
    _rawValue = value;
    await _animateTo(value, duration, curve);
  }
}